News for hackers. Stuff that matters.
Re:JSON: The JavaScript subset that isn't by Hawramani on Sunday May 15, 2011 @12:26PM (#2550197)
JSON started out with JavaScript and slowly expanded beyond the ECMAScript specifications to become more versatile. I don't see what the big deal is.

Humans prefer easily processable and storable information, and for this reason they like to think JSON is JavaScript Object Notation.

This reminds of how ECMA doesn't like to be called the _European_ Computer Manufacturer's Association, since they have now grown beyond that, and prefer being called Ecma.

Re:JSON: The JavaScript subset that isn't by tomstuart on Sunday May 15, 2011 @12:28PM (#2550202)
As the OP says, the big deal is that people frequently assume that JavaScript's eval is an acceptable JSON parser — for example, this is the fundamental assumption which makes JSONP work. If your JSON isn't guaranteed to be valid JavaScript, you might run into actual problems.
Re:JSON: The JavaScript subset that isn't by DougBTX on Sunday May 15, 2011 @02:41PM (#2550467)
It does seem more like a bug in the JSON spec than anything else.
Re:JSON: The JavaScript subset that isn't by burgerbrain on Sunday May 15, 2011 @03:51PM (#2550652)
Wouldn't using eval to parse JSON be quite hazardous in the same way as python's pickle, and thus be limited to pretty specific use-cases (limited moreso than just simply to JS)?
Re:JSON: The JavaScript subset that isn't by comex on Sunday May 15, 2011 @04:53PM (#2550767)
It used to be quite common and is still done (and is required for the hack known as JSONP); lots of the time you're retrieving JSON from the same server you loaded the original page from so it's safe.
Re:JSON: The JavaScript subset that isn't by Hawramani on Sunday May 15, 2011 @01:05PM (#2550277)
I see. Should have read the whole thing before commenting.