Skip to content

The documentation on using Utf8JsonReader should explain how to obtain different kinds of objects from it, like e.g. JsonNode. #35021

Closed
@konrad-jamrozik

Description

@konrad-jamrozik

As in subject, the section Use Utf8JsonReader should explain how it can be converted to different types. For example, one can convert it to JsonNode, by calling appropriate overload of JsonNode.Parse:

JsonNode? jsonNode = JsonNode.Parse(ref reader);

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)
  • and given custom type 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:


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.


Associated WorkItem - 97027

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions