JsonDocument
Provides a mechanism for examining the structural content of a JSON value without automatically instantiating data values.
Gets the root element of this JSON document.
public static JsonDocument Parse(ReadOnlyMemory<byte> utf8Json, JsonDocumentOptions options = default)
Parses memory as UTF-8-encoded text representing a single JSON byte value into a JsonDocument.
public static JsonDocument Parse(ReadOnlySequence<byte> utf8Json, JsonDocumentOptions options = default)
Parses a sequence as UTF-8-encoded text representing a single JSON byte value into a JsonDocument.
Parses a Stream as UTF-8-encoded data representing a single JSON value into a JsonDocument. The stream is read to completion.
Parses text representing a single JSON character value into a JsonDocument.
Parses text representing a single JSON string value into a JsonDocument.
public static Task<JsonDocument> ParseAsync(Stream utf8Json, JsonDocumentOptions options = default, CancellationToken cancellationToken = default)
Parses a Stream as UTF-8-encoded data representing a single JSON value into a JsonDocument. The stream is read to completion.
Parses one JSON value (including objects or arrays) from the provided reader.
Attempts to parse one JSON value (including objects or arrays) from the provided reader.
Releases the resources used by this JsonDocument instance.
Writes the document to the provided writer as a JSON value.