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
Assembly: Purchasing.Common.dll
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 |