Class JsonObject
JsonObject class for encapsulating generic object types. We use this to hide internal Json implementation details.
Implements
Inherited Members
Namespace: Unity.Cloud.Assets
Assembly: Unity.Cloud.Assets.dll
Syntax
public class JsonObject : IDeserializable
Methods
GetAsString()
Returns the internal object as a string.
Declaration
public string GetAsString()
Returns
| Type | Description |
|---|---|
| string | The internal object as a string. |
GetAs<T>()
Returns the object as a defined type.
Previously this function restricted use of object or dynamic
types but validation for these has been removed. As such, be
careful when passing or exposing objects of these types.
Declaration
public T GetAs<T>()
Returns
| Type | Description |
|---|---|
| T | The internal object cast to type T. |
Type Parameters
| Name | Description |
|---|---|
| T | The type to cast internal object to. |
GetNewJsonObjectResponse(Dictionary<string, List<object>>)
Convert dictionary of string, list of object to dictionary of string, list of jsonobject.
Declaration
public static Dictionary<string, List<IDeserializable>> GetNewJsonObjectResponse(Dictionary<string, List<object>> o)
Parameters
| Type | Name | Description |
|---|---|---|
| Dictionary<string, List<object>> | o | The dictionary of string to list of objects. |
Returns
| Type | Description |
|---|---|
| Dictionary<string, List<IDeserializable>> | The dictionary of string, list of jsonobjects. |
GetNewJsonObjectResponse(Dictionary<string, object>)
Convert dictionary of string, object to dictionary of string, jsonobject.
Declaration
public static Dictionary<string, IDeserializable> GetNewJsonObjectResponse(Dictionary<string, object> o)
Parameters
| Type | Name | Description |
|---|---|---|
| Dictionary<string, object> | o | The dictionary of string, objects. |
Returns
| Type | Description |
|---|---|
| Dictionary<string, IDeserializable> | The dictionary of string, jsonobjects. |
GetNewJsonObjectResponse(IEnumerable<List<object>>)
Convert list of list of object to list of list of jsonobject.
Declaration
public static List<List<IDeserializable>> GetNewJsonObjectResponse(IEnumerable<List<object>> o)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<List<object>> | o | The list of list of objects. |
Returns
| Type | Description |
|---|---|
| List<List<IDeserializable>> | The list of list of jsonobjects. |
GetNewJsonObjectResponse(IEnumerable<object>)
Convert list of object to list of jsonobject.
Declaration
public static List<IDeserializable> GetNewJsonObjectResponse(IEnumerable<object> o)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<object> | o | The list of objects. |
Returns
| Type | Description |
|---|---|
| List<IDeserializable> | The list of jsonobjects. |
GetNewJsonObjectResponse(object)
Convert object to jsonobject.
Declaration
public static IDeserializable GetNewJsonObjectResponse(object o)
Parameters
| Type | Name | Description |
|---|---|---|
| object | o | The object. |
Returns
| Type | Description |
|---|---|
| IDeserializable | The jsonobject. |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |