JSON vs. XML: The Debate
Written by on January 4th, 2007 in Ajax News.
The big debate over the winter holidays seems to be people shouting about JSON vs. XML.
Dare Obasanjo has a nice round-up, as well as his own opinions on the matter:
In the past two weeks, I’ve seen three different posts from various XML heavy hitters committing this very sin
- JSON and XML by Tim Bray - This kicked it off and starts off by firing some easily refutable allegations about the extensibility and unicode capabilities of JSON as a general data transfer format.
- Tim Bray on JSON and XML by Don Box - Refutes the allegations by Tim Bray above but still misses the point.
- All markup ends up looking like XML by David Megginson - argues that XML is just like JSON except with the former we use angle brackets and in the latter we use curly braces + square brackets. Thus they are “Turing” equivalent. Academically interesting but not terribly useful information if you are a Web developer trying to get things done.
This is my plea to you, if you are an XML guru and you aren’t sure why JSON seems to have come out of nowhere to threaten your precious XML, go read JSON vs. XML: Browser Security Model and JSON vs. XML: Browser Programming Models then let’s have the discussion.
If you’re too busy to read them, here’s the executive summary. JSON is a better fit for Web services that power Web mashups and AJAX widgets due to the fact that it is essentially serialized Javascript objects which makes it fit better client side scripting which is primarily done in Javascript. That’s it. XML will never fit the bill as well for these scenarios without changes to the existing browser ecosystem which I doubt are forthcoming anytime soon.
Next up: CSV vs. Fixed Width Documents.
Source: Ajaxian
Original Article: http://ajaxian.com/archives/json-vs-xml-the-debate