TapSDK C#
Classes | Static Public Member Functions | List of all members
TapTap.Common.Json Class Reference

This class encodes and decodes JSON strings. Spec. details, see http://www.json.org/ More...

Static Public Member Functions

static object Deserialize (string json)
 Parses the string json into a value More...
 
static string Serialize (object obj)
 Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string More...
 

Detailed Description

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.

Member Function Documentation

◆ Deserialize()

static object TapTap.Common.Json.Deserialize ( string  json)
inlinestatic

Parses the string json into a value

Parameters
jsonA JSON string.
Returns
An List<object>, a Dictionary<string, object>, a double, an integer,a string, null, true, or false

◆ Serialize()

static string TapTap.Common.Json.Serialize ( object  obj)
inlinestatic

Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string

Parameters
jsonA Dictionary<string, object> / List<object>
Returns
A JSON encoded string, or null if object 'json' is not serializable

The documentation for this class was generated from the following file: