Table of Contents

Class JTokenReader

Namespace
Newtonsoft.Json.Linq
Assembly
Newtonsoft.Json.dll

Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.

public class JTokenReader : JsonReader, IDisposable, IJsonLineInfo
Inheritance
JTokenReader
Implements
Inherited Members

Constructors

JTokenReader(JToken)

Initializes a new instance of the JTokenReader class.

public JTokenReader(JToken token)

Parameters

token JToken

The token to read from.

Methods

Read()

Reads the next JSON token from the stream.

public override bool Read()

Returns

bool

true if the next token was read successfully; false if there are no more tokens to read.

ReadAsBytes()

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

public override byte[] ReadAsBytes()

Returns

byte[]

A Byte[] or a null reference if the next JSON token is null.

ReadAsDateTimeOffset()

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

public override DateTimeOffset? ReadAsDateTimeOffset()

Returns

DateTimeOffset?

A Nullable<T>.

ReadAsDecimal()

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

public override decimal? ReadAsDecimal()

Returns

decimal?

A Nullable<T>.

ReadAsInt32()

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

public override int? ReadAsInt32()

Returns

int?

A Nullable<T>.