[occi-wg] Simple JSON rendering for OCCI
Richard Davies
richard.davies at elastichosts.com
Mon May 11 12:00:39 CDT 2009
> For the benefit of showing what an integration point might look like,
> would it be possible to autogenerate some XML from this?
I don't know what the standard tools are, but I'm sure it would be a trivial
mechanical transform to go between:
[
{
"id": "418d982c-9f6a-4079-9aa9-82123b10c533",
"category": "server",
"title": "My Server",
"cores": 2,
"memory": 2147483648,
"status": "active",
"ide:0:0": {
"source": "65a1e5c4-19a5-4e7b-8a76-8c6460d78734",
"title": "Primary hard disk attachment"
}
},
{
"id": "65a1e5c4-19a5-4e7b-8a76-8c6460d78734",
"category": "storage",
"title": "My Storage",
"size": 1000000000
}
]
and:
<object>
<id>418d982c-9f6a-4079-9aa9-82123b10c533"</id>
<category>server</category>
<title>My Server</title>
<cores>2</cores>
<memory>2147483648</memory>
<status>active</status>
<ide:0:0>
<source>65a1e5c4-19a5-4e7b-8a76-8c6460d78734</source>
<title>Primary hard disk attachment</title>
</ide:0:0>
</object>
<object>
<id>65a1e5c4-19a5-4e7b-8a76-8c6460d78734</id>
<category>storage</category>
<title>My Storage</title>
<size>1000000000</size>
</object>
[Actually - this example might just have pointed out that : is not a great
character for the interface specifier!]
Obviously the XML version could have all the tags put inside an occi
namespace and an appropriate schema describing them.
Cheers,
Richard.
More information about the occi-wg
mailing list