Property | Type | Description | |
---|---|---|---|
lastDecode | string | ||
lastErrorIndex | int |
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.
|
|
jsonDecode ( string json ) : object |
Parses the string json into a value
|
|
jsonEncode ( object json ) : string |
Converts a Hashtable / ArrayList / Dictionary(string,string) object into a JSON string
|
|
lastDecodeSuccessful ( ) : bool |
On decoding, this function returns the position at which the parse failed (-1 = no error).
|
Method | Description | |
---|---|---|
eatWhitespace ( char json, int &index ) : void | ||
getLastIndexOfNumber ( char json, int index ) : int | ||
lookAhead ( char json, int index ) : int | ||
nextToken ( char json, int &index ) : int | ||
parseArray ( char json, int &index ) : |
||
parseNumber ( char json, int &index ) : double | ||
parseObject ( char json, int &index ) : Hashtable | ||
parseString ( char json, int &index ) : string | ||
parseValue ( char json, int &index, bool &success ) : object | ||
serializeArray ( ArrayList anArray, StringBuilder builder ) : bool | ||
serializeDictionary ( string>.Dictionary |
||
serializeNumber ( double number, StringBuilder builder ) : void | ||
serializeObject ( Hashtable anObject, StringBuilder builder ) : bool | ||
serializeObjectOrArray ( object objectOrArray, StringBuilder builder ) : bool | ||
serializeString ( string aString, StringBuilder builder ) : void | ||
serializeValue ( object value, StringBuilder builder ) : bool |
protected static eatWhitespace ( char json, int &index ) : void | ||
json | char | |
index | int | |
return | void |
public static getLastErrorSnippet ( ) : string | ||
return | string |
protected static getLastIndexOfNumber ( char json, int index ) : int | ||
json | char | |
index | int | |
return | int |
public static jsonDecode ( string json ) : object | ||
json | string | A JSON string. |
return | object |
public static jsonEncode ( object json ) : string | ||
json | object | A Hashtable / ArrayList |
return | string |
public static lastDecodeSuccessful ( ) : bool | ||
return | bool |
protected static lookAhead ( char json, int index ) : int | ||
json | char | |
index | int | |
return | int |
protected static nextToken ( char json, int &index ) : int | ||
json | char | |
index | int | |
return | int |
protected static parseArray ( char json, int &index ) : |
||
json | char | |
index | int | |
return |
protected static parseNumber ( char json, int &index ) : double | ||
json | char | |
index | int | |
return | double |
protected static parseObject ( char json, int &index ) : Hashtable | ||
json | char | |
index | int | |
return | Hashtable |
protected static parseString ( char json, int &index ) : string | ||
json | char | |
index | int | |
return | string |
protected static parseValue ( char json, int &index, bool &success ) : object | ||
json | char | |
index | int | |
success | bool | |
return | object |
protected static serializeArray ( ArrayList anArray, StringBuilder builder ) : bool | ||
anArray | ArrayList | |
builder | StringBuilder | |
return | bool |
protected static serializeDictionary ( string>.Dictionary |
||
dict | string>.Dictionary | |
builder | StringBuilder | |
return | bool |
protected static serializeNumber ( double number, StringBuilder builder ) : void | ||
number | double | |
builder | StringBuilder | |
return | void |
protected static serializeObject ( Hashtable anObject, StringBuilder builder ) : bool | ||
anObject | Hashtable | |
builder | StringBuilder | |
return | bool |
protected static serializeObjectOrArray ( object objectOrArray, StringBuilder builder ) : bool | ||
objectOrArray | object | |
builder | StringBuilder | |
return | bool |
protected static serializeString ( string aString, StringBuilder builder ) : void | ||
aString | string | |
builder | StringBuilder | |
return | void |
protected static serializeValue ( object value, StringBuilder builder ) : bool | ||
value | object | |
builder | StringBuilder | |
return | bool |