The XML vs. JSON debate is one of the bigger topics in developer circles during the last decade. Although XML has several advantages, such as being a defined standard since 1996, JSON’s lighter approach has proved popular. ProgrammableWeb’s historical API data shows that XML as a data format peaked in mid-2009, but that JSON has been rising for the last eight years.
The chart above shows the percentage of APIs added to the ProgrammableWeb directory that support XML or JSON back to late 2005. In September 2009, 72.66% of all APIs were XML, the highest it ever achieved. In that same month, JSON was 28.31% of the directory. Math whizzes will recognize those two percentages add up to just over 100%. That’s because many APIs support both JSON and XML. A minority of APIs support alternative formats or have no formats listed in the ProgrammableWeb directory.
The early growth of JSON came from APIs adding support for the newer format or launching with both XML and JSON support. However, a shot of growth in late 2010 and early 2011 was driven by a notable number of new APIs turning their backs on XML. At the time, 20% of new APIs did not support XML at all.
Each of the last six months has seen a new record for the percentage of JSON APIs in the directory. As of mid-December, JSON APIs accounted for more than 47% of the entire directory. Considering that this includes the mid-2000s, when XML ruled, it’s notable that JSON may pass XML sometime in 2014.
Indeed, if you look at the data for 2013, January and February were the only months when more than 50% of new APIs supported XML. By contrast, almost every month saw more than 50%—and as high as 70% in August—of new APIs support JSON. On the year as a whole (as of mid-December), 60% of APIs added in 2013 supported JSON vs. 37% for XML.
The story of JSON over XML isn’t new—it’s clear this was a long, consistent assault by the new format on the older standard. Also, it’s obvious than many API providers and consumers still find value in XML data. As we enter 2014, keep an eye on the JSON APIs and XML APIs lists in the directory. In which month do you think JSON will pass XML?