json-rust icon indicating copy to clipboard operation
json-rust copied to clipboard

Order of `JsonValue::Object` entries

Open timothee-haudebourg opened this issue 5 years ago • 1 comments

The documentation is not clear about the order in which the entries of a JSON object will be iterated through the JsonValue::entries method. Is it a lexicographic order? Order of definition in the original string?

Issue #68 is letting me think there was some kind of defined order between keys in an older version of the crate, but is now the order of definition.

timothee-haudebourg avatar Mar 17 '20 15:03 timothee-haudebourg

Current Object is preserving insertion order, which seems to be a thing most people expect. Will make a note to add it to the docs.

maciejhirsz avatar Mar 17 '20 21:03 maciejhirsz