For example, if I deserialize the following JSON into a JsonNode:
{
"property1": 1,
"property2": 2,
"property3": 3
}
and then traverse the elements with JsonNode#fields, is there any guarantee that the iterator will return the properties in the order they were defined (i.e. property1, property2, property3)?
Intuitively I would assume the answer is no, because the JSON spec defines objects as "an unordered set of name/value pairs". HOWEVER, JSON RFC (RFC 7159) says this:
JSON parsing libraries have been observed to differ as to whether or not they make the ordering of object members visible to calling software.
And I haven't been able to find any information about how Jackson handles this.