My Project
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Static Public Member Functions | Public Attributes | Static Protected Member Functions | List of all members
UniExtensions.Serialization.JsonSerializer Class Reference

Static Public Member Functions

static object Decode (byte[] json)
 
static object Decode (string json)
 
static void Decode (object instance, string json)
 
static object Decode (string json, ref bool success)
 
static string Encode (object json)
 
static T Decode< T > (byte[] json)
 
static T Decode< T > (string json)
 

Public Attributes

const int TOKEN_NONE = 0
 
const int TOKEN_CURLY_OPEN = 1
 
const int TOKEN_CURLY_CLOSE = 2
 
const int TOKEN_SQUARED_OPEN = 3
 
const int TOKEN_SQUARED_CLOSE = 4
 
const int TOKEN_COLON = 5
 
const int TOKEN_COMMA = 6
 
const int TOKEN_STRING = 7
 
const int TOKEN_NUMBER = 8
 
const int TOKEN_TRUE = 9
 
const int TOKEN_FALSE = 10
 
const int TOKEN_NULL = 11
 

Static Protected Member Functions

static Hashtable ParseObject (char[] json, ref int index, ref bool success)
 
static ArrayList ParseArray (char[] json, ref int index, ref bool success)
 
static object ParseValue (char[] json, ref int index, ref bool success)
 
static string ParseString (char[] json, ref int index, ref bool success)
 
static object ParseNumber (char[] json, ref int index, ref bool success)
 
static int GetLastIndexOfNumber (char[] json, int index)
 
static void EatWhitespace (char[] json, ref int index)
 
static int LookAhead (char[] json, int index)
 
static int NextToken (char[] json, ref int index)
 
static bool SerializeValue (object value, StringBuilder builder)
 
static bool SerializeObject (IDictionary anObject, StringBuilder builder)
 
static bool SerializeArray (IEnumerable anArray, StringBuilder builder)
 
static bool SerializeString (string aString, StringBuilder builder)
 
static bool SerializeNumber (int number, StringBuilder builder)
 
static bool SerializeNumber (float number, StringBuilder builder)
 
static bool SerializeNumber (long number, StringBuilder builder)
 
static bool SerializeNumber (double number, StringBuilder builder)
 
static bool IsNumeric (object o)
 Determines if a given object is numeric in any way (can be integer, double, null, etc). More...
 

Member Function Documentation

static object UniExtensions.Serialization.JsonSerializer.Decode ( byte[]  json)
inlinestatic
static object UniExtensions.Serialization.JsonSerializer.Decode ( string  json)
inlinestatic
static void UniExtensions.Serialization.JsonSerializer.Decode ( object  instance,
string  json 
)
inlinestatic
static object UniExtensions.Serialization.JsonSerializer.Decode ( string  json,
ref bool  success 
)
inlinestatic
static T UniExtensions.Serialization.JsonSerializer.Decode< T > ( byte[]  json)
inlinestatic
Type Constraints
T :class 
T :new() 
static T UniExtensions.Serialization.JsonSerializer.Decode< T > ( string  json)
inlinestatic
Type Constraints
T :class 
T :new() 
static void UniExtensions.Serialization.JsonSerializer.EatWhitespace ( char[]  json,
ref int  index 
)
inlinestaticprotected
static string UniExtensions.Serialization.JsonSerializer.Encode ( object  json)
inlinestatic
static int UniExtensions.Serialization.JsonSerializer.GetLastIndexOfNumber ( char[]  json,
int  index 
)
inlinestaticprotected
static bool UniExtensions.Serialization.JsonSerializer.IsNumeric ( object  o)
inlinestaticprotected

Determines if a given object is numeric in any way (can be integer, double, null, etc).

Thanks to mtighe for pointing out Double.TryParse to me.

static int UniExtensions.Serialization.JsonSerializer.LookAhead ( char[]  json,
int  index 
)
inlinestaticprotected
static int UniExtensions.Serialization.JsonSerializer.NextToken ( char[]  json,
ref int  index 
)
inlinestaticprotected
static ArrayList UniExtensions.Serialization.JsonSerializer.ParseArray ( char[]  json,
ref int  index,
ref bool  success 
)
inlinestaticprotected
static object UniExtensions.Serialization.JsonSerializer.ParseNumber ( char[]  json,
ref int  index,
ref bool  success 
)
inlinestaticprotected
static Hashtable UniExtensions.Serialization.JsonSerializer.ParseObject ( char[]  json,
ref int  index,
ref bool  success 
)
inlinestaticprotected
static string UniExtensions.Serialization.JsonSerializer.ParseString ( char[]  json,
ref int  index,
ref bool  success 
)
inlinestaticprotected
static object UniExtensions.Serialization.JsonSerializer.ParseValue ( char[]  json,
ref int  index,
ref bool  success 
)
inlinestaticprotected
static bool UniExtensions.Serialization.JsonSerializer.SerializeArray ( IEnumerable  anArray,
StringBuilder  builder 
)
inlinestaticprotected
static bool UniExtensions.Serialization.JsonSerializer.SerializeNumber ( int  number,
StringBuilder  builder 
)
inlinestaticprotected
static bool UniExtensions.Serialization.JsonSerializer.SerializeNumber ( float  number,
StringBuilder  builder 
)
inlinestaticprotected
static bool UniExtensions.Serialization.JsonSerializer.SerializeNumber ( long  number,
StringBuilder  builder 
)
inlinestaticprotected
static bool UniExtensions.Serialization.JsonSerializer.SerializeNumber ( double  number,
StringBuilder  builder 
)
inlinestaticprotected
static bool UniExtensions.Serialization.JsonSerializer.SerializeObject ( IDictionary  anObject,
StringBuilder  builder 
)
inlinestaticprotected
static bool UniExtensions.Serialization.JsonSerializer.SerializeString ( string  aString,
StringBuilder  builder 
)
inlinestaticprotected
static bool UniExtensions.Serialization.JsonSerializer.SerializeValue ( object  value,
StringBuilder  builder 
)
inlinestaticprotected

Member Data Documentation

const int UniExtensions.Serialization.JsonSerializer.TOKEN_COLON = 5
const int UniExtensions.Serialization.JsonSerializer.TOKEN_COMMA = 6
const int UniExtensions.Serialization.JsonSerializer.TOKEN_CURLY_CLOSE = 2
const int UniExtensions.Serialization.JsonSerializer.TOKEN_CURLY_OPEN = 1
const int UniExtensions.Serialization.JsonSerializer.TOKEN_FALSE = 10
const int UniExtensions.Serialization.JsonSerializer.TOKEN_NONE = 0
const int UniExtensions.Serialization.JsonSerializer.TOKEN_NULL = 11
const int UniExtensions.Serialization.JsonSerializer.TOKEN_NUMBER = 8
const int UniExtensions.Serialization.JsonSerializer.TOKEN_SQUARED_CLOSE = 4
const int UniExtensions.Serialization.JsonSerializer.TOKEN_SQUARED_OPEN = 3
const int UniExtensions.Serialization.JsonSerializer.TOKEN_STRING = 7
const int UniExtensions.Serialization.JsonSerializer.TOKEN_TRUE = 9

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