Why is JSON so popular? Developers want out of the syntax business
71–80 of 133 posts
Re: Why is JSON so popular? Developers want out of the syntax business
#72JSON is so popular because it's data description abilities are poorer than that of XMLs. Everything in JSON can be easily mapped to a few basic types in any popular language, and so all the JSON writers/readers do exactly that. The consequence is that it's very easy to work with JSON. Contrast with XML, which has node attributes and children, to start with. This alone is sufficient to make it not as naturally represe…
JSON is an example of 'worse is better'.
Re: Why is JSON so popular? Developers want out of the syntax business
#73The baby that has been thrown out with the bathwater here is a schema/data description layer. NOT , I repeat NOT , I repeat NOT for verification but rather for tools, so that people working in strongly typed languages can interact with JSON services in a reasonable manner. Unfortunately the one option I see, JSON Schema, appears to have caught the XML/Java bug, and has gotten very complicated.
JSON-schema, if you really need it http://tools.ietf.org/html/draft-zyp-json-schema-03
Re: Why is JSON so popular? Developers want out of the syntax business
#74The best way I've encountered to construct XML: first-name John last-name Smith I kid you not. That's what I'm dealing with at work right now. Thank you, enterprise SOAP solutions.
Re: Why is JSON so popular? Developers want out of the syntax business
#75Ironically, php provides a way to access XML data almost as easily as JASON data - SimpleXML. Do other languages/frameworks really have nothing similar?
Only problem with SimpleXML is that it needs to have the complete file in memory. This isn't a problem for small XML files. But reading a file of lets say 100MB will produce tons of objects an thus a large amount of used memory.
Re: Why is JSON so popular? Developers want out of the syntax business
#76JSON can be consumed by JavaScript. This makes pushing JSON rules easy. I can create an API once in JSON. Now, someone can create a web app and make API calls with JavaScript.
That's the reason it's popular.
Another, smaller reason, is:
Many languages/libraries/frameworks provide poor XML support. If your hand coding your XML-RPC/SOAP calls, or dealing with your average XML in a way different then you would JSON, I really don't know what to say other than: Why?
All the other reasons: verbosity, confusion over XML, etc. All those are okay, I guess, but aren't good reasons.
If JSON couldn't be parsed by JavaScript, it wouldn't be used.
Re: Why is JSON so popular? Developers want out of the syntax business
#77The mostly-just-one-way-to-organize-it approach cannot be overstated here. XPath is neat, but iterating through parser results is still a pain.
That because XML does not map well to Simula style OO. "Iterating" XML in XSLT (a language designed to manipulate XML) is way less of a pain.
It has a place, it can be useful, but I thoroughly detest it.
Re: Why is JSON so popular? Developers want out of the syntax business
#78The best way I've encountered to construct XML: first-name John last-name Smith I kid you not. That's what I'm dealing with at work right now. Thank you, enterprise SOAP solutions.
Re: Why is JSON so popular? Developers want out of the syntax business
#79JSON is so popular because it's data description abilities are poorer than that of XMLs. Everything in JSON can be easily mapped to a few basic types in any popular language, and so all the JSON writers/readers do exactly that. The consequence is that it's very easy to work with JSON. Contrast with XML, which has node attributes and children, to start with. This alone is sufficient to make it not as naturally represe…
JSON is an example of 'worse is better'.