Re:Why is JSON so popular? Developers want out of the syntax...
by zachanker on Wednesday June 22, 2011 @10:32PM
(#2686401)
Reiterating the point the blog post makes, but: It's very very easy to structure the same data in different ways in XML. While JSON has the same issue, it's a lot harder to do and you have less flexibility in making bad storage decisions.
You are absolutely right on walking the structure. JSON just tends to be easier (in my experience), even when working with XML libraries that make it less of a pain.
Re:Why is JSON so popular? Developers want out of the syntax...
by nowarninglabel on Thursday June 23, 2011 @12:29AM
(#2686664)
I'll give the opposing opinion that I find working with XML easier than JSON, but mostly because of QueryPath.
The difference between walking JSON and XML is simply the syntax of the parser library your are using.
The problem with XML is it has things that don't map directly to most OO languages, like node order matters, and attributes and elements are similar but different things, and mixed content.
So JSON is nice simply because it's close the the OO style everyone is used to today, and is in fact a subset of one of those languages.
IMO either way we need to settle on a way to interchange structured data, and agree on data types, but I would prefer some binary format, text encoding all this data such a waste of space/time.