3 ms·
If you have a parser that's looking at keys in a hash as sorted, you should change your parser. Lists sure but not keys.
by igetspam 6y ago
If you have a parser that's looking at keys in a hash as sorted, you should change your parser. Lists sure but not keys.
- gmfawcett 6y agoYou're free to encode meaning in the order if you want, as the JSON spec explicitly punts on the issue: "The JSON syntax does not impose any restrictions on the strings used as names, does not require that name strings be unique, and does not assign any significance to the ordering of name/value pairs. These are all semantic considerations that may be defined by JSON processors or in specifications defining specific uses of JSON for data interchange." https://www.ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf https://www.ecma-international.org/wp-content/uploads/ECMA-4...