Twitter Drop XML

Twitter To Deprecate XML On Streaming APIs

Jessica Thornsby
Twitter-To-Deprecate-XML-On-Streaming-APIs

‘Meh’ says XML expert Norman Walsh.

Twitter have announced they will drop support for XML on all Streaming APIs on December 6th, 2010. This deprecation will not apply to the Search and REST APIs, but all clients requesting XML from stream.twitter.com will be affected. Twitter are currently encouraging users connected to an XML-based Twitter Streaming API to migrate the code to consume JSON by the December 6th deadline. But, what does the community think about this? “Meh,” writes Norman Walsh. To him, whether you use JSON or XML all depends on the task at hand.

 

“If all you want to pass around are atomic values or lists or hashes of atomic values, JSON has many of the advantages of XML: it’s straightforwardly usable over the Internet, supports a wide variety of applications, it’s easy to write programs to process JSON, it has few optional features, it’s human-legible and reasonably clear, its design is formal and concise, JSON documents are easy to create, and it uses Unicode.” He also sees JSON as having the advantage when it comes to writing JavaScript in a web browser, as the mapping from JavaScript objects to JSON prevents the serialisation issues that can arise when using XML. However, XML was designed for use when transmitting structured bundles of atomic values, and dealing with unstructured data. Norman Walsh stresses that, once you take out the context, it is impossible to say JSON is intrinsically simpler than XML: “For bundles of atomic values, it’s a little simpler. And the JavaScript APIs are definitely simpler. But I’ve seen attempts to represent mixed content in JSON and simple they aren’t.” He advises using both JSON and XML, depending on which fits the particular situation the best.

Despite the level-headed tone of his blog, he can’t resist questioning JSON’s limitations: “I look forward to seeing what the JSON folks do when they are asked to develop richer APIs. When they want to exchange less well structured data, will they shoehorn it into JSON? I see occasional mentions of a schema language for JSON, will other languages follow?”

Author
Comments
comments powered by Disqus