Closed
Description
Currently the JSON Schema does not have provisions to enforce the order of fields in an object. This is a big problem when the JSON in question is source controlled and generated by disparate tools. The contents of two JSON files may be identical, but the ordering may be different which can cause massive diffs in Git.
There are many other cases where the order of fields should also be preserved. One such instance is when JSON is used to define the memory structure of an embedded device.
XSD supports this via the "sequence" element:
https://www.w3.org/TR/2004/REC-xmlschema-0-20041028/#DefnDeclars
Metadata
Metadata
Assignees
Labels
No labels