XML, the much easier successor to SGML once was the de facto standard for data exchange formats on the web. Upon the arrival of JSON this changed really fast. Mostly due to the fact that JSON is really simple compared to XML. It’s relly easy to serialize and unserialize data to JSON in nearly any language used in modern web development, it is human readable, it is clean and it features a lot less overhead than XML Last but not least, it is much closer to datastrucutres used in typical programming languages. Still XML was quite dominant – maybe because of it’s enterprisey nature, but some new developments are likely going to change that.
Recently twitter announced that they will stop supporting XML in their streaming API. Foursquare equally recommends developers to use their API with JSON as they plan to go JSON only with their next API version.
From this perspective, my reaction to JSON is a combination of “Yay” and “Sigh”.
It’s “Yay”, because for important use cases JSON is dramatically better than XML. In particular, JSON shines as a programming language-independent representation of typical programming language data structures. This is an incredibly important use case and it would be hard to overstate how appallingly bad XML is for this. The fundamental problem is the mismatch between programming language data structures and the XML element/attribute data model of elements.
Though also his “sigh” is really understandable:
This is not a good thing for either community (and it’s why part of my reaction to JSON is “Sigh”). XML misses out by not having the innovation, enthusiasm and traction that the Web developer community brings with it, and the Web developer community misses out by not being able to take advantage of the powerful and convenient technologies that have been built on top of XML over the last decade.
This sure holds true as in the JSON world I still have to find those really powerfull and feature complete tools that are available for XML.