Currently the GeoJson class hierarchy can be encoded, but not decoded. See com.mongodb.client.model.geojson.codecs.PointCodec for example, in which encode is implemented, but not decode. Basically this means that you can insert or query for data using this class hierarchy, but that's about it.
This makes sense currently because the driver doesn't support decoding to POJOs natively yet. But when we do it would be nice to be able to handle POJO's like:
public class MyPOJO { private Point myPoint; private List<Point> yourPoints; ... }
For that to work we'll need to implement the decode methods in all the GeoJSON codecs.
- depends on
-
JAVA-2264 Support constructor based serialization
- Closed