<PackageReference Include="Newtonsoft.Json" Version="5.0.5" />

JsonReader

public abstract class JsonReader : IDisposable
Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
public bool CloseInput { get; set; }

Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the reader is closed.

public CultureInfo Culture { get; set; }

Gets or sets the culture used when reading JSON. Defaults to InvariantCulture.

protected State CurrentState { get; }

Gets the current reader state.

public DateParseHandling DateParseHandling { get; set; }

Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.

Get or set how DateTime time zones are handling when reading JSON.

public virtual int Depth { get; }

Gets the depth of the current token in the JSON document.

Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.

public int? MaxDepth { get; set; }

Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a JsonReaderException.

public virtual string Path { get; }

Gets the path of the current JSON token.

public virtual char QuoteChar { get; protected set; }

Gets the quotation mark character used to enclose the value of a string.

public virtual JsonToken TokenType { get; }

Gets the type of the current JSON token.

public virtual object Value { get; }

Gets the text value of the current JSON token.

public virtual Type ValueType { get; }

Gets The Common Language Runtime (CLR) type for the current JSON token.

protected JsonReader()

Initializes a new instance of the JsonReader class with the specified TextReader.

public virtual void Close()

Changes the State to Closed.

protected virtual void Dispose(bool disposing)

Releases unmanaged and - optionally - managed resources

public abstract bool Read()

Reads the next JSON token from the stream.

public abstract byte[] ReadAsBytes()

Reads the next JSON token from the stream as a Byte[].

public abstract DateTime? ReadAsDateTime()

Reads the next JSON token from the stream as a Nullable<T>.

Reads the next JSON token from the stream as a Nullable<T>.

public abstract decimal? ReadAsDecimal()

Reads the next JSON token from the stream as a Nullable<T>.

public abstract int? ReadAsInt32()

Reads the next JSON token from the stream as a Nullable<T>.

public abstract string ReadAsString()

Reads the next JSON token from the stream as a String.

protected void SetStateBasedOnCurrent()

Sets the state based on current token type.

protected void SetToken(JsonToken newToken)

Sets the current token.

protected void SetToken(JsonToken newToken, object value)

Sets the current token and value.

public void Skip()

Skips the children of the current token.