Muokkaa

Jaa


JsonReaderState(JsonReaderOptions) Constructor

Definition

Constructs a new JsonReaderState instance.

public JsonReaderState (System.Text.Json.JsonReaderOptions options = default);
new System.Text.Json.JsonReaderState : System.Text.Json.JsonReaderOptions -> System.Text.Json.JsonReaderState
Public Sub New (Optional options As JsonReaderOptions = Nothing)

Parameters

options
JsonReaderOptions

Defines the customized behavior of the Utf8JsonReader that is different from the JSON RFC (for example how to handle comments, or the maximum depth allowed when reading). By default, the Utf8JsonReader follows the JSON RFC strictly (comments within the JSON are invalid) and reads up to a maximum depth of 64.

Exceptions

The maximum depth is set to a non-positive value (< 0).

Remarks

An instance of this state must be passed to the Utf8JsonReader constructor with the JSON data. Unlike the Utf8JsonReader, which is a ref struct, the state 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 Utf8JsonReader.

Applies to