Hey AJAX guys... remove X or drop JSON!

Over and over the discussion of JSON vs XML (vs YAML…) appears: they are compared as languages to serialize object graphs. I may be old fashioned but I find there’s no valid reason for anything but XML.

Here’s a set claims in favor of JSON (or YAML it seems):

  • JSON is more readable: I am sorry but I don’t find this true, being XML it’s much easier to know where parts start and end since end-tags are named. Most of the times the object graph is not sufficiently indented to recognize any structure hence readability only appears after you’ve tweaked a bit.

  • JSON is more compact: that may be true on the number of characters on the document but who cares? It is not true for either bandwidth (compressed XML is very cheap) or performance (precisely because of the many XML libraries you can avoid putting the whole document in RAM!).

  • JSON is more javascript friendly: that may be true because MSXML is so much non-standard but is this the reason to stop working on libraries?

All AJAX initiatives I see favor JSON because of these non-convincing arguments and they almost always forget the X of AJAX… so hey guys, be honest and really drop it or agree that you’ve been tricked by the MSXML-lack-of-standard!

On the contrary the standards-based approach of XML (which makes it complex, I know, but it’s not a killer, just use a decent library such as JDOM!) gives huge set of tools and standards, something which helps long term development of independent parts, loosely-coupled web-services, transformation language, schema documentation producers, validators in several flavours, powerful editors, gigantic databases, incredible query languages, codecs of many sorts, non-questionnable Unicode support…

Trackback URL for this post:

http://eds.activemath.org/en/trackback/221