Skip to content

GeoJSONs cannot be read when the properties are ordered differently than expected #227

Description

@henleo

For example, reading this GeoJSON results in a NullPointerException:
{"coordinates":[[[1,0.01],[1,-0.01],[2,-0.02],[3,-0.01],[3,0.01],[1,0.01]]],"type":"Polygon"}

This might not be desirable behaviour, since JSON objects are unordered collections afaik and some JSON parsers do not preserve the order of the properties when serializing/deserializing, but instead order them alphabetically, for example.

It also sounds like this is not intended by the standard (https://www.rfc-editor.org/rfc/rfc7946#section-1.2):
"The ordering of the members of any JSON object defined in this
document MUST be considered irrelevant, as specified by [RFC7159]."

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions