Class JsonSerialization
A class to serialize and deserialize objects to JSON.
Inherited Members
Namespace: Unity.Cloud.Common
Assembly: Unity.Cloud.Common.dll
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.  |