Hi I have been trying to serialize a polygon to a variable using GeoJSON4STJ for Nettopologysuite. So far deserialization works fine, but I am unable to serialize it. Is there any way to do this?
I have added the following code to the startup file as required
public void ConfigureServices(IServiceCollection services) {
services.AddControllers()
.AddJsonOptions(options => {
options.JsonSerializerOptions.Converters.Add(new NetTopologySuite.IO.Converters.GeoJsonConverterFactory());
});
}
And I am trying to use the following lin
geoStr = JsonSerializer.Serialize(geometry);