C# Class MongdioLogic.db.DocumentParser

Mostrar archivo Open project: okku/Mongdio Class Usage Examples

Protected Properties

Property Type Description
lastDecode string
lastErrorIndex int

Public Methods

Method Description
GetLastErrorIndex ( ) : int

On decoding, this function returns the position at which the parse failed (-1 = no error).

GetLastErrorSnippet ( ) : string

If a decoding error occurred, this function returns a piece of the JSON string at which the error took place. To ease debugging.

LastDecodeSuccessful ( ) : bool

On decoding, this function returns the position at which the parse failed (-1 = no error).

Parse ( string json ) : object

Parses the string json into a value

Protected Methods

Method Description
EatWhitespace ( char json, int &index ) : void
GetLastIndexOfNumber ( char json, int index ) : int
GetLastIndexOfRegEx ( char json, int index ) : int
LookAhead ( char json, int index ) : int
NextToken ( char json, int &index ) : int
ParseArray ( char json, int &index ) : List
ParseNumber ( char json, int &index ) : object
ParseObject ( char json, int &index ) : Document
ParseString ( char json, int &index, bool allowNonQutedString ) : string
ParseValue ( char json, int &index, bool &success ) : object

Private Methods

Method Description
ParseOID ( char json, int &index ) : object
ParseRegEx ( char json, int &index ) : MongoRegex
ParseStringOrDate ( char json, int &index ) : object

Method Details

EatWhitespace() protected method

protected EatWhitespace ( char json, int &index ) : void
json char
index int
return void

GetLastErrorIndex() public method

On decoding, this function returns the position at which the parse failed (-1 = no error).
public GetLastErrorIndex ( ) : int
return int

GetLastErrorSnippet() public method

If a decoding error occurred, this function returns a piece of the JSON string at which the error took place. To ease debugging.
public GetLastErrorSnippet ( ) : string
return string

GetLastIndexOfNumber() protected method

protected GetLastIndexOfNumber ( char json, int index ) : int
json char
index int
return int

GetLastIndexOfRegEx() protected method

protected GetLastIndexOfRegEx ( char json, int index ) : int
json char
index int
return int

LastDecodeSuccessful() public method

On decoding, this function returns the position at which the parse failed (-1 = no error).
public LastDecodeSuccessful ( ) : bool
return bool

LookAhead() protected method

protected LookAhead ( char json, int index ) : int
json char
index int
return int

NextToken() protected method

protected NextToken ( char json, int &index ) : int
json char
index int
return int

Parse() public method

Parses the string json into a value
public Parse ( string json ) : object
json string A JSON string.
return object

ParseArray() protected method

protected ParseArray ( char json, int &index ) : List
json char
index int
return List

ParseNumber() protected method

protected ParseNumber ( char json, int &index ) : object
json char
index int
return object

ParseObject() protected method

protected ParseObject ( char json, int &index ) : Document
json char
index int
return MongoDB.Driver.Document

ParseString() protected method

protected ParseString ( char json, int &index, bool allowNonQutedString ) : string
json char
index int
allowNonQutedString bool
return string

ParseValue() protected method

protected ParseValue ( char json, int &index, bool &success ) : object
json char
index int
success bool
return object

Property Details

lastDecode protected_oe property

protected string lastDecode
return string

lastErrorIndex protected_oe property

On decoding, this value holds the position at which the parse failed (-1 = no error).
protected int lastErrorIndex
return int