C# Class Newtonsoft.Json.JsonTextReader

Represents a reader that provides fast, non-cached, forward-only access to JSON text data.
Inheritance: JsonReader, IJsonLineInfo
Exibir arquivo Open project: JamesNK/Newtonsoft.Json Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Changes the reader's state to JsonReader.State.Closed.

HasLineInfo ( ) : bool

Gets a value indicating whether the class can return line information.

JsonTextReader ( TextReader reader ) : System

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

Read ( ) : bool

Reads the next JSON token from the stream.

ReadAsBoolean ( ) : bool?

Reads the next JSON token from the stream as a Nullable{T} of Boolean.

ReadAsBytes ( ) : byte[]

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

ReadAsDateTime ( ) : DateTime?

Reads the next JSON token from the stream as a Nullable{T} of DateTime.

ReadAsDateTimeOffset ( ) : DateTimeOffset?

Reads the next JSON token from the stream as a Nullable{T} of DateTimeOffset.

ReadAsDecimal ( ) : decimal?

Reads the next JSON token from the stream as a Nullable{T} of Decimal.

ReadAsDouble ( ) : double?

Reads the next JSON token from the stream as a Nullable{T} of Double.

ReadAsInt32 ( ) : int?

Reads the next JSON token from the stream as a Nullable{T} of Int32.

ReadAsString ( ) : string

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

Private Methods

Method Description
BigIntegerParse ( string number, CultureInfo culture ) : object
BlockCopyChars ( char src, int srcOffset, char dst, int dstOffset, int count ) : void
ClearRecentString ( ) : void
CreateUnexpectedCharacterException ( char c ) : JsonReaderException
EatWhitespace ( bool oneOrMore ) : bool
EndComment ( bool setToken, int initialPosition, int endPosition ) : void
EnsureBuffer ( ) : void
EnsureBufferNotEmpty ( ) : void
EnsureChars ( int relativePosition, bool append ) : bool
HandleNull ( ) : void
IsSeparator ( char c ) : bool
MatchValue ( string value ) : bool
MatchValueWithTrailingSeparator ( string value ) : bool
OnNewLine ( int pos ) : void
ParseComment ( bool setToken ) : void
ParseConstructor ( ) : void
ParseFalse ( ) : void
ParseNull ( ) : void
ParseNumber ( ReadType readType ) : void
ParseNumberNaN ( ReadType readType ) : object
ParseNumberNegativeInfinity ( ReadType readType ) : object
ParseNumberPositiveInfinity ( ReadType readType ) : object
ParseObject ( ) : bool
ParsePostValue ( ) : bool
ParseProperty ( ) : bool
ParseString ( char quote, ReadType readType ) : void
ParseTrue ( ) : void
ParseUndefined ( ) : void
ParseUnicode ( ) : char
ParseUnquotedProperty ( ) : void
ParseValue ( ) : bool
ProcessCarriageReturn ( bool append ) : void
ProcessLineFeed ( ) : void
ProcessValueComma ( ) : void
ReadChars ( int relativePosition, bool append ) : bool
ReadData ( bool append ) : int
ReadData ( bool append, int charsRequired ) : int
ReadFinished ( ) : void
ReadNullChar ( ) : bool
ReadNumberIntoBuffer ( ) : void
ReadNumberValue ( ReadType readType ) : object
ReadStringIntoBuffer ( char quote ) : void
ReadStringValue ( ReadType readType ) : object
SetCharBuffer ( char chars ) : void
ShiftBufferIfNeeded ( ) : void
ThrowReaderError ( string message, Exception ex = null ) : JsonReaderException
ValidIdentifierChar ( char value ) : bool
WriteCharToBuffer ( char writeChar, int lastWritePosition, int writeToPosition ) : void

Method Details

Close() public method

Changes the reader's state to JsonReader.State.Closed.
public Close ( ) : void
return void

HasLineInfo() public method

Gets a value indicating whether the class can return line information.
public HasLineInfo ( ) : bool
return bool

JsonTextReader() public method

Initializes a new instance of the JsonTextReader class with the specified TextReader.
public JsonTextReader ( TextReader reader ) : System
reader TextReader The containing the JSON data to read.
return System

Read() public method

Reads the next JSON token from the stream.
public Read ( ) : bool
return bool

ReadAsBoolean() public method

Reads the next JSON token from the stream as a Nullable{T} of Boolean.
public ReadAsBoolean ( ) : bool?
return bool?

ReadAsBytes() public method

Reads the next JSON token from the stream as a Byte[].
public ReadAsBytes ( ) : byte[]
return byte[]

ReadAsDateTime() public method

Reads the next JSON token from the stream as a Nullable{T} of DateTime.
public ReadAsDateTime ( ) : DateTime?
return DateTime?

ReadAsDateTimeOffset() public method

Reads the next JSON token from the stream as a Nullable{T} of DateTimeOffset.
public ReadAsDateTimeOffset ( ) : DateTimeOffset?
return DateTimeOffset?

ReadAsDecimal() public method

Reads the next JSON token from the stream as a Nullable{T} of Decimal.
public ReadAsDecimal ( ) : decimal?
return decimal?

ReadAsDouble() public method

Reads the next JSON token from the stream as a Nullable{T} of Double.
public ReadAsDouble ( ) : double?
return double?

ReadAsInt32() public method

Reads the next JSON token from the stream as a Nullable{T} of Int32.
public ReadAsInt32 ( ) : int?
return int?

ReadAsString() public method

Reads the next JSON token from the stream as a String.
public ReadAsString ( ) : string
return string