The documentation on using Utf8JsonReader
should explain how to obtain different kinds of objects from it, like e.g. JsonNode
.
#35021
Labels
As in subject, the section Use
Utf8JsonReader
should explain how it can be converted to different types. For example, one can convert it toJsonNode
, by calling appropriate overload ofJsonNode.Parse
:Ideally the doc would also explain how to get out of
Utf8JsonReader
in the simplest and most performant way:JsonElement
(e.g.JsonElement.ParseValue
),JsonDocument
(e.g.JsonDocument.ParseValue
)T
(e.g.JsonSerializer.Deserialize<T>
)or link at least link to a document teaching the reader these types exists and how can be used together.
Related:
How to write custom converters for JSON serialization (marshalling) in .NET
should explain how to handle complex types #35020Consume decoded JSON strings
inHow to use a JSON document, Utf8JsonReader, and Utf8JsonWriter in System.Text.Json
does not compile #35019Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
Associated WorkItem - 97027
The text was updated successfully, but these errors were encountered: