@ SuppressWarnings ( { "unchecked" , "rawtypes" , "deprecation" } ) public String toJson ( ) { StringWriter stringWriter = new StringWriter ( ) ; JsonWriter writer = new JsonWriter ( stringWriter , new JsonWriterSettings ( ) ) ; Codec codec = getRegistry ( ) . get ( getClass ( ) ) ; codec . encode ( writer , this , EncoderContext . builder ( ) . build ( ) ) ; return stringWriter . toString ( ) ; }
Converts to GeoJSON representation