C# Класс XSerializer.JsonReader

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
IsWhitespace bool
ReadCurrent int
ReadEscapedChar char
ReadLiteral void
ReadNumber string
ReadWhitespace string
TryReadString bool

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

Метод Описание
Discard ( string path ) : void

Read and discard the next content value. If the next content type is JsonNodeType.OpenObject or JsonNodeType.OpenArray, then the reader will continue to read and discard content until the matching JsonNodeType.CloseObject or JsonNodeType.CloseArray content type is found. For all other content types, no additional reads are made.

Dispose ( ) : void
JsonReader ( TextReader reader, IJsonSerializeOperationInfo info ) : System
PeekContent ( ) : JsonNodeType

Reads the next non-whitespace node type without changing the state of the reader. If the next node type is whitespace, then all leading whitespace is consumed and discarded. The next node type is then returned, again without changing the state of the reader.

Read ( string path ) : bool

Reads the next node from the stream.

ReadContent ( string path ) : bool

Reads the next non-whitespace node from the stream.

ReadProperties ( string path ) : IEnumerable

Read the properties of a json object. The resulting collection contains the name of each property. As the collection is enumerated, for each property name, the reader is positioned at the beginning of the property's value. The caller is expected to parse the value, calling Read or ReadContent one or more times, before continuing to enumerate the collection.

SetDecryptReads ( bool value, string path ) : void

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

Метод Описание
IsWhitespace ( int c ) : bool
ReadCurrent ( ) : int
ReadEscapedChar ( ) : char
ReadLiteral ( string path, string value ) : void
ReadNumber ( char c ) : string
ReadWhitespace ( char first ) : string
TryReadString ( object &value, JsonNodeType &nodeType ) : bool

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

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

Read and discard the next content value. If the next content type is JsonNodeType.OpenObject or JsonNodeType.OpenArray, then the reader will continue to read and discard content until the matching JsonNodeType.CloseObject or JsonNodeType.CloseArray content type is found. For all other content types, no additional reads are made.
public Discard ( string path ) : void
path string
Результат void

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

public Dispose ( ) : void
Результат void

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

public JsonReader ( TextReader reader, IJsonSerializeOperationInfo info ) : System
reader TextReader
info IJsonSerializeOperationInfo
Результат System

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

Reads the next non-whitespace node type without changing the state of the reader. If the next node type is whitespace, then all leading whitespace is consumed and discarded. The next node type is then returned, again without changing the state of the reader.
public PeekContent ( ) : JsonNodeType
Результат JsonNodeType

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

Reads the next node from the stream.
public Read ( string path ) : bool
path string
Результат bool

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

Reads the next non-whitespace node from the stream.
public ReadContent ( string path ) : bool
path string
Результат bool

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

Read the properties of a json object. The resulting collection contains the name of each property. As the collection is enumerated, for each property name, the reader is positioned at the beginning of the property's value. The caller is expected to parse the value, calling Read or ReadContent one or more times, before continuing to enumerate the collection.
If the JSON object is malformed.
public ReadProperties ( string path ) : IEnumerable
path string /// The path to the current object. Used for error reporting. ///
Результат IEnumerable

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

public SetDecryptReads ( bool value, string path ) : void
value bool
path string
Результат void