<PackageReference Include="System.Text.Json" Version="4.6.0-preview6.19264.9" />

System.Text.Json

Namespace with 13 public types

Classes

 JsonDocument
 JsonException
 Utf8JsonWriter Provides a high-performance API for forward-only, non-cached writing of UTF-8 encoded JSON text. It writes the text sequentially with no caching and adheres to the JSON RFC by default (https://tools.ietf.org/html/rfc8259), with the exception of writing comments.

Structures

 JsonElement
 JsonEncodedText
 JsonProperty
 JsonReaderOptions Provides the ability for the user to define custom behavior when reading JSON using the that may deviate from strict adherence to the JSON specification (as per the JSON RFC - https://tools.ietf.org/html/rfc8259), which is the default behavior.
 JsonReaderState Defines an opaque type that holds and saves all the relevant state information which must be provided to the to continue reading after processing incomplete data. This type is required to support reentrancy when reading incomplete data, and to continue reading once more data is available. Unlike the , which is a ref struct, this type can survive across async/await boundaries and hence this type is required to provide support for reading in more data asynchronously before continuing with a new instance of the .
 JsonWriterOptions Provides the ability for the user to define custom behavior when writing JSON using the . By default, the JSON is written without any indentation or extra white space. Also, the will throw an exception if the user attempts to write structurally invalid JSON.
 Utf8JsonReader Provides a high-performance API for forward-only, read-only access to the UTF-8 encoded JSON text. It processes the text sequentially with no caching and adheres strictly to the JSON RFC by default (https://tools.ietf.org/html/rfc8259). When it encounters invalid JSON, it throws a JsonReaderException with basic error information like line number and byte position on the line. Since this type is a ref struct, it does not directly support async. However, it does provide support for reentrancy to read incomplete data, and continue reading once more data is presented. To be able to set max depth while reading OR allow skipping comments, create an instance of and pass that in to the reader.

Enumerations

 JsonCommentHandling This enum defines the various ways the can deal with comments.
 JsonTokenType This enum defines the various JSON tokens that make up a JSON text and is used by the when moving from one token to the next. The starts at 'None' by default. The 'Comment' enum value is only ever reached in a specific mode and is not reachable by default.
 JsonValueType