News for hackers. Stuff that matters.
Re:Twitter Goes JSON-Only With One API by axod on Monday November 15, 2010 @06:07AM (#1905920)
If you don't care about the standard, you can use / * * / to comment out stuff in JSON. It's a shame this wasn't in the spec. Along with making quotes optional for keys.

It's a real shame that the native JSON object, and the spec missed out these useful features...

   var obj = eval("({foo:3 /*,bar:7*/ })");
Works fine, but JSON.parse and probably most other JSON libs throw a hissy fit for no good reason.

I love JSON, but making quotes compulsory for keys, and missing out comments are both a PITA.

There are no comments on this comment yet.