2

I am trying to serialize/deserialize org.locationtech.jts.geom.Geometry(version 1.16.0) using com.bedatadriven.jackson.datatype.jts.JtsModule. It comes packaged with:

<dependency>
     <groupId>com.graphhopper.external</groupId>
     <artifactId>jackson-datatype-jts</artifactId>
     <version>1.0-2.7</version>
</dependency>

I have registered it using spring configuration mechanism:

   @Bean
   public JtsModule jtsModule()
   {
      return new JtsModule();
   }

But somehow com.bedatadriven.jackson.datatype.jts.serialization.GeometryDeserializer is not invoked.

Is there something else needed to be done?

Mandroid
  • 6,200
  • 12
  • 64
  • 134

1 Answers1

0

GeometryDeserializer / GeometrySerializer worked for com.vividsolutions.jts.geom.Geometry

An issue is open about it here

You can create your custom serializer and deserializer for org.locationtech.jts.geom.Geometry using same code available.

Example for point

There is a PR for Upgrade to Locationtech jts but not merged yet

Eklavya
  • 17,618
  • 4
  • 28
  • 57