Class
ObjectSerializer

Static class used to serialize/deserialize JSON objects to .NET objects.

Definition

Namespace:ArtOfTest.WebAii.Silverlight

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public static class ObjectSerializer

Inheritance: objectObjectSerializer

Methods

Deserialize(Type, string)

Deserializes the JSON string into a .NET object.

Declaration

cs-api-definition
public static object Deserialize(Type t, string jsonString)

Parameters

t

Type

The type to deserialize the string into.

jsonString

string

The input JSON.

Returns

object

A deserialized .NET object of type t.

InitKnownTypes(Assembly)

Init types from assembly

Declaration

cs-api-definition
public static void InitKnownTypes(Assembly assembly)

Parameters

assembly

Assembly

Serialize(Type, object)

Serializes a .NET object into a JSON.

Declaration

cs-api-definition
public static string Serialize(Type t, object o)

Parameters

t

Type

The objects type to serialize.

o

object

the object to serialize into a JSON.

Returns

string

The serialized JSON.