<PackageReference Include="newtonsoft.json" Version="4.0.1" />

JsonReader

public abstract class JsonReader : IDisposable
Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
protected enum State

Specifies the state of the reader.

protected State CurrentState { get; }

Gets the current reader state.

public virtual int Depth { get; }

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

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 decimal? ReadAsDecimal()

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

protected void SetStateBasedOnCurrent()

Sets the state based on current token type.

protected void SetToken(JsonToken newToken)

Sets the current token.

protected virtual void SetToken(JsonToken newToken, object value)

Sets the current token and value.

public void Skip()

Skips the children of the current token.