Class JsonSerialization
A class to serialize and deserialize objects to JSON.
Inherited Members
Namespace: Unity.Cloud.Common
Syntax
public static class JsonSerialization
Methods
Deserialize<T>(String)
Deserialize a JSON string to a specified type.
Declaration
public static T Deserialize<T>(string json)
Parameters
| Type | Name | Description |
|---|---|---|
| String | json | The JSON string to deserialize. |
Returns
| Type | Description |
|---|---|
| T | The deserialized type if successful, or null if unsuccessful. |
Type Parameters
| Name | Description |
|---|---|
| T | The type to deserialize to. |
Serialize<T>(T)
Serialize a JSON string from a specified type.
Declaration
public static string Serialize<T>(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The object to serialize. |
Returns
| Type | Description |
|---|---|
| String | The serialized JSON string. |
Type Parameters
| Name | Description |
|---|---|
| T | The type to serialize. |