This class encodes and decodes JSON strings. Spec. details, see http://www.json.org/.
More...
|
static object | jsonDecode (string json) |
| Parses the string json into a value.
|
|
static string | jsonEncode (object json) |
| Converts a Hashtable / ArrayList / Dictionary(string,string) object into a JSON string.
|
|
static bool | lastDecodeSuccessful () |
| On decoding, this function returns the position at which the parse failed (-1 = no error).
|
|
static int | getLastErrorIndex () |
| On decoding, this function returns the position at which the parse failed (-1 = no error).
|
|
static string | getLastErrorSnippet () |
| If a decoding error occurred, this function returns a piece of the JSON string at which the error took place. To ease debugging.
|
|
|
static int | lastErrorIndex = -1 |
| On decoding, this value holds the position at which the parse failed (-1 = no error).
|
|
This class encodes and decodes JSON strings. Spec. details, see http://www.json.org/.
JSON uses Arrays and Objects. These correspond here to the datatypes ArrayList and Hashtable. All numbers are parsed to doubles.
◆ getLastErrorIndex()
static int Enablegames.MiniJSON.getLastErrorIndex |
( |
| ) |
|
|
inlinestatic |
On decoding, this function returns the position at which the parse failed (-1 = no error).
- Returns
◆ getLastErrorSnippet()
static string Enablegames.MiniJSON.getLastErrorSnippet |
( |
| ) |
|
|
inlinestatic |
If a decoding error occurred, this function returns a piece of the JSON string at which the error took place. To ease debugging.
- Returns
◆ jsonDecode()
static object Enablegames.MiniJSON.jsonDecode |
( |
string | json | ) |
|
|
inlinestatic |
Parses the string json into a value.
- Parameters
-
- Returns
- An ArrayList, a Hashtable, a double, a string, null, true, or false
◆ jsonEncode()
static string Enablegames.MiniJSON.jsonEncode |
( |
object | json | ) |
|
|
inlinestatic |
Converts a Hashtable / ArrayList / Dictionary(string,string) object into a JSON string.
- Parameters
-
json | A Hashtable / ArrayList |
- Returns
- A JSON encoded string, or null if object 'json' is not serializable
◆ lastDecodeSuccessful()
static bool Enablegames.MiniJSON.lastDecodeSuccessful |
( |
| ) |
|
|
inlinestatic |
On decoding, this function returns the position at which the parse failed (-1 = no error).
- Returns
The documentation for this class was generated from the following file:
- /Users/yiyangshang/egdl2/Assets/eag/Scripts/enablegames/PortalAPI/MiniJSON.cs