JSON Continues its Winning Streak Over XML

Romin Irani, December 3rd, 2010

API providers and developers are making their choice quite clear when it comes to choosing between XML and JSON. A nearly unanimous choice seems to be JSON. Several API providers, including Twitter, have either stopped supporting the XML format or are even introducing newer versions of their API with only JSON support. In our ProgrammableWeb API directory, JSON seems to be the winner.

A couple of items are of interest this week in the XML versus JSON debate. We had earlier reported that come early December, Twitter plans to stop support for XML in its Streaming API. So in case you are late into this news, the deadline is Dec 6th. If your app still expects XML, you need to move quickly on that.

James Clark has written an interesting post titled XML vs the Web. He states several reasons for JSON being adopted of late: a simple and short specification and a combination of JSON with a dynamic programming language is probably the key to its ease of integration, simplicity and adoption across the web community. The blog post is worth reading since it balances the good work that has been done by XML and various tools/frameworks that have been built upon it. The best path ahead, according to James, is to take the best of XML and make it work well with the what the Web community wants, such as HTML5, JavaScript and JSON.

What is your take on the JSON versus XML debate? Or does it not matter anymore since JSON is widely accepted and you would rather focus on your application rather than worry about the data format war and relative arguments depending on which side you are?

Tags: Issues
Both comments and pings are currently closed.

15 Responses to “JSON Continues its Winning Streak Over XML”

December 3rd, 2010
at 12:07 am
Comment by: Kurt Milam

We prefer to work with XML, and we actually convert JSON data to XML for processing. Unless I’m missing something, there are simply more and better tools for parsing and working with XML than with JSON – XSLT, various DOMDocument implementations. DOMDocument is a standard implementation, as well, which means, in theory, that your logic should be easily portable between different programming languages and platforms.

I like the fact that JSON’s lean, and I do like JSON for some simpler integrations and tasks, but XML is the right choice for complex, multi app integrations, imo.

Kurt

December 3rd, 2010
at 12:11 am
Comment by: Romin Irani

Hello Kurt,

Thanks for your comments. I agree with you on the fact that XML is quite well suited for complex integrations especially within the enterprise or in cases where XML-based document standards already exist i.e. Rosettanet, ebXML and the likes.

JSON seems to be preferred choice especially when it comes to building Mashups that are Web based.

Thanks,
Romin

December 3rd, 2010
at 12:23 am
Comment by: Phil Leggetter

In an age where we are trying to simplify things XML unfortunately naturally lends itself to being complicated. Namespaces, heavy nesting and countless references to other elements are exactly the opposite of the movement we are seeing with NoSQL – driven by the need to keep data simple (and that storage isn’t expensive any more). For data to be easily consumed it should be as simple as possible with a preference being on simple name/value pairs.

Although you can have complicated nesting and references in JSON if you really like we tend to see simpler JSON formats. This could just be because the target destination for a JSON file/feed could be a web browser where, even with the super-performant modern browsers, we still want to keep processing to a minimum.

Superfeedr recently bowed to the pressure of delivering Atom notifications in real-time by converting the updates to a JSON format: http://blog.superfeedr.com/json-pubsubhubbub-notification/ This is yet another clear indication that JSON is the preferred data format.

December 3rd, 2010
at 11:54 am
Comment by: mdmadph

I had always understood XML was preferable to JSON by management-types because XML is more readable by non-programmers.

December 4th, 2010
at 8:03 am
Comment by: JSON vs XML: Programmableweb declare JSON largement gagnant | Veille IT

[...] de référence des webservices Programmableweb.com (acquis par Alcatel) déclare JSON largement gagnant face à XML en qualifiant le choix des éditeurs de presque unanimes. Certains géants comme Twitter ont même [...]

December 4th, 2010
at 1:14 pm
Comment by: » JSON Continues its Winning Str… Flawless Mind

[...] Continues its Winning Streak Over XML @ http://blog.programmableweb.com/2010/12/03/json-continues-its-winning-streak-over-xml/ [...]

December 5th, 2010
at 7:51 am
Comment by: » Twitter Updates for 2010-12-05 Flawless Mind

[...] Continues its Winning Streak Over XML @ http://blog.programmableweb.com/2010/12/03/json-continues-its-winning-streak-over-xml/ # [...]

December 5th, 2010
at 8:08 am
Comment by: » Twitter Weekly Updates for 2010-12-05 Flawless Mind

[...] Continues its Winning Streak Over XML @ http://blog.programmableweb.com/2010/12/03/json-continues-its-winning-streak-over-xml/ # [...]

December 9th, 2010
at 10:12 am
Comment by: Foursquare API v2 is Public, v1 Deprecated

[...] to predominate, particularly in the realm of socially based services. We’ve been chronicling JSON’s emergence over XML as the developer’s choice in data formats, it’s no surprise that foursquare is moving [...]

January 6th, 2011
at 5:40 pm
Comment by: Real-time Data Delivery: HTTP Streaming Versus PubSubHubbub

[...] is define the message format. This can be seen as a positive and a negative but since we are seeing JSON continuing to win over XML as the preferred data format it looks like PubSubHubbub will have to evolve away from XML to keep [...]

January 8th, 2011
at 4:48 am
Comment by: Real-time Data Delivery: HTTP Streaming Versus PubSubHubbub | LocalLab : Foire aux Infos

[...] define the message format. This can be seen as a positive and a negative but since we are seeing JSON continuing to win over XML as the preferred data format it looks like PubSubHubbub will have to evolve away from XML to keep [...]

January 13th, 2011
at 5:01 am
Comment by: 121 Reasons RSS is Still Relevant

[...] has been winning over developers and API providers over the last year due to its lightness and simplicity. There’s no denying [...]

January 13th, 2011
at 5:40 am
Comment by: 121 Reasons RSS is Still Relevant | Another Newyork Times

[...] has been winning over developers and API providers over the last year due to its lightness and simplicity. There’s no denying [...]

May 21st, 2011
at 1:01 pm
Comment by: Anonymous coward

JSON is for programmers, XML is for consultants.

On a more serious note, JSON is ideally suited for providing APIs, whereas XML is a better choice for heavily annotated structured data, where not just data but also semantics have to be packed in the same file/stream.

The reason why JSON seems to be winning is that nowadays, when everything is going to the web, and the web has become a platform over which applications and humans communicate intensively, data exchange is less frequent than function/service calls, therefore the need for describing semantics, and thus using XML, is less ig than the need to provide APIs, and using JSON.

If most of the web traffic generated by web apps would consist of transferring lots of files (like product catalogs, complete stock quote lists – everything that stays valid as time passes), exported at one end and imported at the other end, instead of transferring transient, non-persistent results of function calls (search results, latest version of your cart on Amazon, route information on Google maps etc.), which immediately get processed on the client side and are then lost/irrelevant, XML would win over JSON. But since the web, although initially conceived as a document exchange platform, evolves towards a universal collaboration platform, this doesn’t happen.

April 15th, 2012
at 11:01 am
Comment by: Week 6 – XML | Jerin P.

[...] JSON Continues its Winning Streak Over XML (programmableweb.com) [...]

Follow the PW team on Twitter

ProgrammableWeb
APIs, mashups and code. Because the world's your programmable oyster.

John Musser
Founder, ProgrammableWeb

Adam DuVander
Executive Editor, ProgrammableWeb. Author, Map Scripting 101. Lover, APIs.