[Openstack] [openstack-dev] [nova] Call for Help -- OpenStack API XML Support

Kevin L. Mitchell kevin.mitchell at rackspace.com
Fri Aug 10 15:22:43 UTC 2012


On Fri, 2012-08-10 at 09:52 -0500, George Reese wrote:
> I personally believe (and this is described in great detail in my API
> book) that you never, ever auto-generate JSON and XML from model
> objects for your REST APIs. You need your models to be free to evolve
> independent from the API representation. 
> 
> If you take that step, you can make your XML and JSON independent be
> first-class citizens. There are other ways as well, but that's my
> recommended approach. 

As a point of information, most (if not all) of the core API uses a
concept of "views" to translate between the model and an intermediate
representation which is then further serialized into either JSON or XML.
Many of the extensions do not use this specific abstraction, but they
often do use something similar.  (The JSON and XML serializer code
probably could not handle having the actual model objects passed to
them…)
-- 
Kevin L. Mitchell <kevin.mitchell at rackspace.com>





More information about the Openstack mailing list