Business Need
Version Control & Collaboration
Data Consistency & Management
AI & Automation
Industry
Aviation
Manufacturing
Legal
Markup & Data Format
XML
JSON
HTML

I presented a paper at the Balisage conference this year on the significance (or not!) of element order in XML, “Element order is always important in XML, except when it isn’t”. Part of this discussion included JSON. In fact the way that order is handled in the two formats is remarkably similar: XML elements are by definition ordered as are JSON array members. Similarly, an XML attribute is a name/value pair as is a JSON object member and both of these can appear in any order in a file. So any orderless information must have a name or key in both XML and JSON. This is not always the case though in real world data.
One question that generated quite a lot of discussion was how best to treat information that has no order, i.e. the order of the elements makes no difference to the meaning. Let’s look at a small example to illustrate this.