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
Serialization of feature lists should include the feature type. We are forced to use a FeatureCollection to the type be included in the serialization.
List<Feature> features = new ArrayList<>(); features.add(new Feature()); String json = new ObjectMapper().writeValueAsString(features); System.out.println(json); // output: [{"properties":{},"geometry":null}]
The text was updated successfully, but these errors were encountered:
In case someone else runs into this, more background information can be found in this issue: FasterXML/jackson-databind#1015
Workaround: instead of using List<Feature>, use:
List<Feature>
private static class FeatureList extends ArrayList<GeoJsonObject> {}; private final FeatureList features = new FeatureList();
Sorry, something went wrong.
No branches or pull requests
Serialization of feature lists should include the feature type. We are forced to use a FeatureCollection to the type be included in the serialization.
The text was updated successfully, but these errors were encountered: