Hi Geert,
On Mon, 2010-10-04 at 15:10 +0200, Geert Jansen wrote:
On 09/29/2010 07:47 PM, Daniel Veillard wrote:
...
> So if you think order of element under<os> is
significant, that's
> just fine,
I think it's a bad idea if we depend on the order of elements in XML.
Let me re-phrase that. I think it's a bad idea if the information model
we use internally for representing REST resources inside a REST
collection, requires the representation format to be able to preserve
ordering for the construct that would most naturally represent key/value
pairs for that representation format.
Okay, I think I agree with that, but ...
...
YAML:
- !vm
id: xxx
name: vm1
memory: 512
bootdevices:
- network
- harddisk
This would come out as:
{'bootdevices': ['network', 'harddisk'], 'id':
'xxx', 'name': 'vm1', 'memory': 512}
i.e. the order of the keys isn't available, but the order of the list of
boot devices *is* maintained. It is a list, not a key/value set ...
right?
Cheers,
Mark.