News for hackers. Stuff that matters.
Re:Why I Love JSON by pjscott on Tuesday November 02, 2010 @01:14AM (#1859357)
I love JSON because I remember how painful it was to use XML for the things I now do with JSON. It's a breath of fresh air.
Re:Why I Love JSON by tyrmored on Tuesday November 02, 2010 @08:00PM (#1862962)
Having used both in admittedly elementary contexts this is the #1 reason, easily
Re:Why I Love JSON by BarkMore on Tuesday November 02, 2010 @12:34AM (#1859289)
I love JSON because there is a straightforward mapping from JSON to the data types supported by many programming languages.
Re:Why I Love JSON by zbanks on Tuesday November 02, 2010 @12:51AM (#1859320)
Agreed. Even if the syntax is wildly different, the structure is similar.

This is where XML gets annoying. Sure, it does make sense in certain situations, but it quickly gets hard to map all the attributes and child nodes into a nice object.

Its easier to drill down to what you need without having to mess with arrays or attribute hashes or retrieving contents. (Retrieving contents is the worst part. Sure CDATA would theoretically help, but what do I do when the API I'm using ignores it? Parsing linebreaks, spaces, and empty tags becomes a hassle!)

Re:Why I Love JSON by kijinbear on Tuesday November 02, 2010 @01:32AM (#1859391)
I love JSON because it provides for one and only one correct way to serialize a particular data structure. With XML I always have to decide whether to use an attribute vs. content vs. child node for a particular piece of data. There's an enormous "impedance mismatch" between XML and pretty much any programming language, whereas JSON just feels natural.
Re:Why I Love JSON by ScottBurson on Tuesday November 02, 2010 @01:36AM (#1859403)
I love s-expressions.
Re:Why I Love JSON by mahmud on Tuesday November 02, 2010 @01:45AM (#1859409)
My other car is a car.

Damn you CDR-coding! selling out our jokes for petty cache.

Re:Why I Love JSON by shubber on Tuesday November 02, 2010 @12:26PM (#1861100)
I love JSON because it's a strict subset of YAML.