Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Jackson from unwrapping List in Geometry #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Strongbeard
Copy link

@Strongbeard Strongbeard commented Jun 19, 2024

When a Geometry containing a single list of LngLatAlt within its coordinates list was serialized using an ObjectMapper with SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED enabled the resulting output no longer matched the examples in RFC7946 due to the array brackets for the coordinates list being omitted. This deviation in expected json format prevents deserialization of the output back to the original Geometry. Preventing this feature from activating on the coordinates list in Geometry, even when enabled in the ObjectMapper, resolves the breaking of the idempotent nature of serialization and deserialization by keeping the output as close to the examples in RFC7946 as possible.

Intended to resolve #68

When a Geometry containing a single list of LngLatAlt within its
coordinates list was serialized using an ObjectMapper with
SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED enabled the
resulting output no longer matched the examples in RFC7946 due to the
array brackets for the coordinates list being omitted. This deviation in
expected json format prevents deserialization of the output back to the
original Geometry. Preventing this feature from activating on the
coordinates list in Geometry, even when enabled in the ObjectMapper,
resolves the breaking of the idempotent nature of serialization and
deserialization by keeping the output as close to the examples in
RFC7946 as possible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant