How To:Transform any JSON API into an XML API

Twitter is dropping XML. They've announced that by March 5th, 2013 their API will no longer support XML as a data format - API v1.1 will support JSON only. What’s the big deal?

It means that every app powered by the Twitter API with XML will break.

Despite the growing popularity of JSON, many developers prefer XML. They are familiar with the parsing libraries, the schema and a powerful collection of XML tools. But after Twitter drops XML, apps built on the XML API will start to see HTTP error responses instead of XML responses. Something like: 406 Not acceptable

So, what to do now? Application developers have a few choices.

  • They can replace their XML parsing libraries with JSON parsing libraries and rebuild their apps
  • They can try to convince Twitter to keep supporting XML
  • They can remove the Twitter API from their apps or
  • They can transform the Twitter JSON response into XML and leave their apps as is

With Apigee Gateway Services, app developers can transform any JSON API into an XML API without changing the original. This short screencast demonstrates how.

 

How To: Customize an API you don't control - JSON to XML transformation