Class Json
JSON utility class.
Inheritance
System.Object
Json
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Json : object
Properties
Provider
Gets or sets the JSON provider to use.
Declaration
public static JsonProvider Provider { get; set; }
Property Value
| Type | Description |
|---|---|
| JsonProvider |
Methods
Deserialize<T>(String)
Deserializes a value from a JSON string.
Declaration
public static T Deserialize<T>(string valueJson)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | valueJson | The JSON string to deserialize. |
Returns
| Type | Description |
|---|---|
| T | The deserialized value. |
Type Parameters
| Name | Description |
|---|---|
| T | The type the value to deserialize. |
Serialize<T>(T)
Serializes a value to a JSON string.
Declaration
public static string Serialize<T>(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The value to serialize. |
Returns
| Type | Description |
|---|---|
| System.String | The serialized JSON string. |
Type Parameters
| Name | Description |
|---|---|
| T | The type the value to serialize. |