Closed charga closed 2 months ago
Hi Carlos,
thanks for the tip.
Until now, the gView.Server uses .NET 6 and for serialization its still uses Newtonsoft.Json.
In my Startup.cs
i use:
services.AddMvc(...).AddNewtonsoftJson(...)
So i think, Newtonsoft also used when the gView.Server returns JSON from an controller.
What have u changed to .NET 7.0? The gView.Server? Or do u use the JsonGeometry Model from you own project. How can i reproduce this error?
Regards and thx for using gView Jürgen
I'll made a new minimal API (7.0) using your JsonGeometry Model...And the serializer ignore NullHandling attribute. So searching internet read about NET 7.0 API. I'll continue investigating
In JsonGeometry // AREA [JsonProperty("rings", NullValueHandling = NullValueHandling.Ignore)] public double?[][,] Rings { get; set; }
System.Text.Json seems to not support multidimension arrays like double?[][,]. I'll tried to move to 7.0, but its produce an error: System.NotSupportedException: The type 'System.Double[,]' is not supported. at System.Text.Json.ThrowHelper.ThrowNotSupportedException_SerializationNotSupported(Type propertyType)
If I change property to List<List<double[]>> seems to work, Need to change a lot, I think. keep in mind if you plan to move
Regards
Carlos