code: @Override
      public void writeShapeSpecificSerialization(LineString value, JsonGenerator jgen, SerializerProvider provider)
              throws IOException {
          jgen.writeFieldName("type");
          jgen.writeString("LineString");
          jgen.writeArrayFieldStart("coordinates");
          // set beanproperty to null since we are not serializing a real property
          JsonSerializer<Object> ser = provider.findValueSerializer(Double.class, null);
          for (int j = 0; j < value.getNumPoints(); j++) {
              Point coordinate = value.getPointN(j);
              jgen.writeStartArray();
              ser.serialize(coordinate.getX(), jgen, provider);
              ser.serialize(coordinate.getY(), jgen, provider);
              jgen.writeEndArray();
          }
          jgen.writeEndArray();
      }
docs: Method that can be called to ask implementation to serialize values of type this serializer handles.
  
  @param value    Value to serialize; can not be null.
  @param jgen     Generator used to output resulting Json content
  @param provider Provider that can be used to get serializers for serializing Objects value contains, if any.
  @throws java.io.IOException If serialization failed.