System.Text.Json(JsonDocument/JsonElement) support in LINQPad 6?
Options
As the blog saids, the new System.Text.Json is faster and efficient than Newtonsoft.Json, especially in UTF-8 area.
Do we have any plan to support System.Text.Json?
Do we have any plan to support System.Text.Json?
var doc = JsonDocument.Parse(utf8ByteContent); // just like JObject/JToken
doc.Dump();
Comments
-
What would you expect LINQPad to output?
JsonDocument is not like Newtsonsoft.Json - there are no properties for LINQPad to walk.
To use it, you write code like this:doc.RootElement.GetProperty ("runtimeTarget").GetProperty ("name").GetString();
-
Well, looks like this is not possible for JsonDocument.😂
-
Looks like there is some improvement room for
.NET Core 6.0 Preview 4
JsonNode
/JsonObject
/JsonArray
/JsonValue
: -
Hello @JoeAlbahari , with the latest version of
JsonNode
/JsonObject
/JsonArray
/JsonValue
, I believe it should be possible to add beatifulized visualization support for them. -
It's coming.
-
Try with the latest beta and let me know how you get along.