Valid JSON

FYI, for the geeks out there, even though:

{ foo: 'bar' }

Is a valid way to initialize a javascript object, it is not valid JSON. In JSON, the key and string values have to be double quoted:

{ "foo": "bar" }

This matters because jQuery 1.4 uses native parsing and the getJSON method will silently fail on malformed files.

Yuck

Leave a Reply

Your email address will not be published. Required fields are marked *