Closed YogiCoder8888 closed 4 days ago
Does SpanJson have a generic Json object class equivalent to System.Text.Json.Nodes.JsonObject?
If not, is it possible to Serialize System.Text.Json.Nodes.JsonObject using SpanJson library?
I tried the following code and get an "System.InvalidOperationException: 'Nesting Limit of 256 exceeded." exception
var x = new JsonObject() { { "test", 1} }; var y = JsonSerializer.Generic.Utf16.Serialize(x);
Thank you.
No, there is no DOM Style API in SpanJson, there is limited support for dynamic (ExpandoObjects). I personally would not recommend using dynamic. Serializing things like JsonObject is not supported.
Does SpanJson have a generic Json object class equivalent to System.Text.Json.Nodes.JsonObject?
If not, is it possible to Serialize System.Text.Json.Nodes.JsonObject using SpanJson library?
I tried the following code and get an "System.InvalidOperationException: 'Nesting Limit of 256 exceeded." exception
var x = new JsonObject() { { "test", 1} }; var y = JsonSerializer.Generic.Utf16.Serialize(x);
Thank you.