Improve JSON parsing