C# Class NetServ.Net.Json.JsonParser

Provided support for parsing JavaScript Object Notation data types from an underlying System.IO.TextReader.
Inheritance: Disposable
Afficher le fichier Open project: appcelerator/entourage Class Usage Examples

Méthodes publiques

Méthode Description
Close ( ) : void

Closes this parser.

JsonParser ( TextReader rdr, bool ownsReader ) : System

Initialises a new instance of the JsonParser class and specifies the source System.IO.TextReader and a value indicating if the instance owns the specified TextReader.

NextToken ( ) : TokenType

Classifies the next token on the underlying stream.

ParseArray ( ) : JsonArray

Parses a NetServ.Net.Json.JsonArray and all contained types from the underlying stream.

ParseBoolean ( ) : JsonBoolean

Parses a NetServ.Net.Json.JsonBoolean from the underlying stream.

ParseNext ( ) : IJsonType

Parses the next type from the underlying stream.

ParseNext ( TokenType type ) : IJsonType

Parses the specified type from the underlying stream.

ParseNull ( ) : JsonNull

Parses a NetServ.Net.Json.JsonNull from the underlying stream.

ParseNumber ( ) : JsonNumber

Parses a NetServ.Net.Json.JsonNumber from the underlying stream.

ParseObject ( ) : JsonObject

Parses a NetServ.Net.Json.JsonObject and all contained types from the underlying stream.

ParseString ( ) : JsonString

Parses a NetServ.Net.Json.JsonString from the underlying stream.

Méthodes protégées

Méthode Description
AssertDepth ( int depth ) : void

Asserts that the specified depth does not exceed P:NetServ.Net.Json.JsonParser.MaximumDepth. If the depth has been exceeded, a System.FormatException is thrown.

Dispose ( bool disposing ) : void

Disposed of this instance.

Peek ( ) : int

Peeks at and returns a single character from the underlying stream.

Peek ( bool skipWhite ) : int

Peeks at the next character from the underlying stream and specifies a value which indicates whether white space characters should be advanced over.

Read ( ) : int

Reads and returns a single character from the underlying stream.

Read ( bool skipWhite ) : int

Reads the next character from the underlying stream and specified a value which indicates whether white space characters should be skipped.

Private Methods

Méthode Description
AssertNext ( TokenType type ) : void
FromHex ( int ch ) : int
IsNumberComponent ( int ch ) : bool
Match ( string value ) : bool
ParseStringImpl ( ) : string
ParseUnicode ( ) : char

Method Details

AssertDepth() protected méthode

Asserts that the specified depth does not exceed P:NetServ.Net.Json.JsonParser.MaximumDepth. If the depth has been exceeded, a System.FormatException is thrown.
protected AssertDepth ( int depth ) : void
depth int The depth.
Résultat void

Close() public méthode

Closes this parser.
public Close ( ) : void
Résultat void

Dispose() protected méthode

Disposed of this instance.
protected Dispose ( bool disposing ) : void
disposing bool True if being called explicitly, otherwise; false /// to indicate being called implicitly by the GC.
Résultat void

JsonParser() public méthode

Initialises a new instance of the JsonParser class and specifies the source System.IO.TextReader and a value indicating if the instance owns the specified TextReader.
public JsonParser ( TextReader rdr, bool ownsReader ) : System
rdr TextReader The underlying TextReader.
ownsReader bool True if this instance owns the TextReader, otherwise; /// false.
Résultat System

NextToken() public méthode

Classifies the next token on the underlying stream.
public NextToken ( ) : TokenType
Résultat TokenType

ParseArray() public méthode

Parses a NetServ.Net.Json.JsonArray and all contained types from the underlying stream.
public ParseArray ( ) : JsonArray
Résultat JsonArray

ParseBoolean() public méthode

Parses a NetServ.Net.Json.JsonBoolean from the underlying stream.
public ParseBoolean ( ) : JsonBoolean
Résultat JsonBoolean

ParseNext() public méthode

Parses the next type from the underlying stream.
public ParseNext ( ) : IJsonType
Résultat IJsonType

ParseNext() public méthode

Parses the specified type from the underlying stream.
public ParseNext ( TokenType type ) : IJsonType
type TokenType The type to parse.
Résultat IJsonType

ParseNull() public méthode

Parses a NetServ.Net.Json.JsonNull from the underlying stream.
public ParseNull ( ) : JsonNull
Résultat JsonNull

ParseNumber() public méthode

Parses a NetServ.Net.Json.JsonNumber from the underlying stream.
public ParseNumber ( ) : JsonNumber
Résultat JsonNumber

ParseObject() public méthode

Parses a NetServ.Net.Json.JsonObject and all contained types from the underlying stream.
public ParseObject ( ) : JsonObject
Résultat JsonObject

ParseString() public méthode

Parses a NetServ.Net.Json.JsonString from the underlying stream.
public ParseString ( ) : JsonString
Résultat JsonString

Peek() protected méthode

Peeks at and returns a single character from the underlying stream.
protected Peek ( ) : int
Résultat int

Peek() protected méthode

Peeks at the next character from the underlying stream and specifies a value which indicates whether white space characters should be advanced over.
protected Peek ( bool skipWhite ) : int
skipWhite bool True to skip white space characters, otherwise; false.
Résultat int

Read() protected méthode

Reads and returns a single character from the underlying stream.
protected Read ( ) : int
Résultat int

Read() protected méthode

Reads the next character from the underlying stream and specified a value which indicates whether white space characters should be skipped.
protected Read ( bool skipWhite ) : int
skipWhite bool True to skip white space characters, otherwise; false.
Résultat int