C# Класс Newtonsoft.Json.JsonReader

Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Close ( ) : void

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

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.

Skip ( ) : void

Skips the children of the current token.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

JsonReader ( ) : System

Initializes a new instance of the JsonReader class.

SetStateBasedOnCurrent ( ) : void

Sets the state based on current token type.

SetToken ( JsonToken newToken ) : void

Sets the current token.

SetToken ( JsonToken newToken, object value ) : void

Sets the current token and value.

Приватные методы

Метод Описание
CreateUnexpectedEndException ( ) : JsonReaderException
GetContentToken ( ) : JsonToken
GetPosition ( int depth ) : Newtonsoft.Json.JsonPosition
GetTypeForCloseToken ( JsonToken token ) : JsonContainerType
IDisposable ( ) : void
MoveToContent ( ) : bool
Peek ( ) : JsonContainerType
Pop ( ) : JsonContainerType
Push ( JsonContainerType value ) : void
ReadAndAssert ( ) : void
ReadAndMoveToContent ( ) : bool
ReadArrayIntoByteArray ( ) : byte[]
ReadBooleanString ( string s ) : bool?
ReadDateTimeOffsetString ( string s ) : DateTimeOffset?
ReadDateTimeString ( string s ) : DateTime?
ReadDecimalString ( string s ) : decimal?
ReadDoubleString ( string s ) : double?
ReadInt32String ( string s ) : int?
ReadIntoWrappedTypeObject ( ) : void
ReaderReadAndAssert ( ) : void
SetFinished ( ) : void
SetPostValueState ( bool updateIndex ) : void
SetToken ( JsonToken newToken, object value, bool updateIndex ) : void
UpdateScopeWithFinishedValue ( ) : void
ValidateEnd ( JsonToken endToken ) : void

Описание методов

Close() публичный Метод

Changes the reader's state to JsonReader.State.Closed.
public Close ( ) : void
Результат void

Dispose() защищенный Метод

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Результат void

JsonReader() защищенный Метод

Initializes a new instance of the JsonReader class.
protected JsonReader ( ) : System
Результат System

Read() публичный абстрактный Метод

Reads the next JSON token from the stream.
public abstract Read ( ) : bool
Результат bool

ReadAsBoolean() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of Boolean.
public ReadAsBoolean ( ) : bool?
Результат bool?

ReadAsBytes() публичный Метод

Reads the next JSON token from the stream as a Byte[].
public ReadAsBytes ( ) : byte[]
Результат byte[]

ReadAsDateTime() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of DateTime.
public ReadAsDateTime ( ) : DateTime?
Результат DateTime?

ReadAsDateTimeOffset() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of DateTimeOffset.
public ReadAsDateTimeOffset ( ) : DateTimeOffset?
Результат DateTimeOffset?

ReadAsDecimal() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of Decimal.
public ReadAsDecimal ( ) : decimal?
Результат decimal?

ReadAsDouble() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of Double.
public ReadAsDouble ( ) : double?
Результат double?

ReadAsInt32() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of Int32.
public ReadAsInt32 ( ) : int?
Результат int?

ReadAsString() публичный Метод

Reads the next JSON token from the stream as a String.
public ReadAsString ( ) : string
Результат string

SetStateBasedOnCurrent() защищенный Метод

Sets the state based on current token type.
protected SetStateBasedOnCurrent ( ) : void
Результат void

SetToken() защищенный Метод

Sets the current token.
protected SetToken ( JsonToken newToken ) : void
newToken JsonToken The new token.
Результат void

SetToken() защищенный Метод

Sets the current token and value.
protected SetToken ( JsonToken newToken, object value ) : void
newToken JsonToken The new token.
value object The value.
Результат void

Skip() публичный Метод

Skips the children of the current token.
public Skip ( ) : void
Результат void