Class Json
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 IList and IDictionary. All numbers are parsed to doubles.
Inherited Members
Namespace: UnityEngine.Purchasing.MiniJSON
Syntax
public static class Json
Methods
Deserialize(String)
Parses the string json into a value
Declaration
public static object Deserialize(string json)
Parameters
| Type | Name | Description |
|---|---|---|
| String | json | A JSON string. |
Returns
| Type | Description |
|---|---|
| Object | An List<object>, a Dictionary<string, object>, a double, an integer,a string, null, true, or false |
Serialize(Object)
Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string
Declaration
public static string Serialize(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | obj | A Dictionary<string, object> / List<object> |
Returns
| Type | Description |
|---|---|
| String | A JSON encoded string, or null if object 'json' is not serializable |