C# Class XSerializer.JsonReader

Inheritance: IDisposable
Afficher le fichier Open project: QuickenLoans/XSerializer Class Usage Examples

Private Properties

Свойство Type Description
IsWhitespace bool
ReadCurrent int
ReadEscapedChar char
ReadLiteral void
ReadNumber string
ReadWhitespace string
TryReadString bool

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

Discard() public méthode

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
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

JsonReader() public méthode

public JsonReader ( TextReader reader, IJsonSerializeOperationInfo info ) : System
reader TextReader
info IJsonSerializeOperationInfo
Résultat System

PeekContent() public méthode

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
Résultat JsonNodeType

Read() public méthode

Reads the next node from the stream.
public Read ( string path ) : bool
path string
Résultat bool

ReadContent() public méthode

Reads the next non-whitespace node from the stream.
public ReadContent ( string path ) : bool
path string
Résultat bool

ReadProperties() public méthode

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. ///
Résultat IEnumerable

SetDecryptReads() public méthode

public SetDecryptReads ( bool value, string path ) : void
value bool
path string
Résultat void