We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
kubahorak opened DATAMONGO-2336 and commented
In GeoJsonModule there are deserializers present.
See Line 55
These allow deserialization from RFC7946 format to GeoJson classes.
Serializing GeoJsonMultiPoint (applies also to other GeoJson classes) with Jackson using GeoJsonModule leads to following JSON:
{ "coordinates": [ { "coordinates": [ 13.306671, 52.475053 ], "type": "Point", "x": 13.306671, "y": 52.475053 }, { "coordinates": [ 13.3063, 52.470674 ], "type": "Point", "x": 13.3063, "y": 52.470674 } ], "type": "MultiPoint" }
RFC7946 Section 3.1.3, Section 3.1.1 and Appendix A.4 specifies that the coordinates should be an array of numbers, not a list of Points.
Expected result would be:
{ "coordinates": [ [ 13.306671, 52.475053 ], [ 13.3063, 52.470674 ] ], "type": "MultiPoint" }
To fix this, I suggest adding serializers to GeoJsonModule.
See following test case:
GeoJsonMultiPoint multipoint = new GeoJsonMultiPoint( new Point(0, 0), new Point(1, 1)); String result = objectMapper.writeValueAsString(multipoint); assertThat(result).isEqualToIgnoringWhitespace( "{ \"type\": \"MultiPoint\", \"coordinates\": [[0.0, 0.0], [1.0, 1.0]] }" );
Affects: 2.1.10 (Lovelace SR10)
The text was updated successfully, but these errors were encountered:
Resolved for 3.2 via #3517
Sorry, something went wrong.
christophstrobl
No branches or pull requests
kubahorak opened DATAMONGO-2336 and commented
In GeoJsonModule there are deserializers present.
See Line 55
These allow deserialization from RFC7946 format to GeoJson classes.
Serializing GeoJsonMultiPoint (applies also to other GeoJson classes) with Jackson using GeoJsonModule leads to following JSON:
RFC7946 Section 3.1.3, Section 3.1.1 and Appendix A.4 specifies that the coordinates should be an array of numbers, not a list of Points.
Expected result would be:
To fix this, I suggest adding serializers to GeoJsonModule.
See following test case:
Affects: 2.1.10 (Lovelace SR10)
The text was updated successfully, but these errors were encountered: