Mostly for programming languages with hash tables / dictionaries.
Python dictionaries hold keys but the keys aren't in any particular order, so allowing them to come out in whatever order maps very naturally to the language.
Python dictionaries hold keys but the keys aren't in any particular order, so allowing them to come out in whatever order maps very naturally to the language.
<myObj>
<Foo>myFoo</Foo>
<Bar>myBar</Bar>
</myObj>
is somehow different from <myObj>
<Bar>myBar</Bar>
<Foo>myFoo</Foo>
</myObj>
is incredibly surprising and frustrating, and XML schema actually supports ignoring the difference but xml schema tools seem to hate using the "all" instead of the "sequence" schema definitions.The worse offender, imho, is Microsoft's DataContractSerializer, whose default behavior is to silently ignore this ordering failure and also silently fail to deserialize any out-of-order elements.
Either fail loudly or be flexible about ordering.
There is no well-adopted analog to xmlschema for json.
<create>...</create>
<delete>...</delete>
Relax NG handles unordered collections well.