openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #09764
Re: Image API v2 Draft 4
>
> APPENDIX B: Outstanding issues
>
> 4) Need to write xsds :(
>
This is easy if you design a model which works with XML. If you have an
XML compatible model, you can generate an XSD and a JSON model from that.
Also, it means you can just use common middleware to map XML to JSON,
rather than coding XML parsing functions.
I think the one thing you'd have to change is that XML won't allow you to
serialize a dictionary with elements as keys (e.g. { "key1": "value1",
"key2": "value2" }, you have to do this: [ { "key": "key1", "value":
"value1" }, { "key": "key2", "value": "value2" } ]
I think this is only done in the image properties.
On the downside: The JSON isn't as JSON-ic as it could be.
On the upside: You need never worry about XML again
Follow ups
References