[Openstack] Crazy Idea for API Formats
mike at openstack.org
Fri Mar 4 19:49:42 UTC 2011
All this talk about auth and making the API easy for developers to use got me thinking.
The two most popular formats for APIs are XML and JSON.
XML is language neutral and sort of painful to read by a human. And writing an XML parser sucks. It's not hard, but it's time consuming and annoying.
So... how about we offer more native formats for other languages? For Java developers, offer raw binary that represents a Serializable when they call something like GET /servers.java. Zero parsing for Java developers.
For Objective-C, GET /servers.cocoa returns XML in the NSPropertyList XML format. Again, zero parsing.
If Python has object serialization you could do it too. That would probably be the easiest to code.
What do you think?
More information about the Openstack