Converts objects to and from javascript object notation strings
public static class JsonSerializerMembers at a glance
| Kind | Members |
|---|---|
| Methods | Deserialize · Serialize |
Methods
Deserialize
public static void Deserialize<T>(
string value,
Action<JsonSerializationData<T>> done
)Converts the given string to an object.
| Parameter | Type | Description |
|---|---|---|
value | string | The string in json notation. |
done | Action<JsonSerializationData<T>> | The action to call when the conversion is complete. |
Type parameters: T: The type to create.
public static void Deserialize<T>(
string value,
JsonSerializerOptions options,
Action<JsonSerializationData<T>> done
)Converts the given string to an object.
| Parameter | Type | Description |
|---|---|---|
value | string | The string in json notation. |
options | JsonSerializerOptions | Options to control the deserialization. |
done | Action<JsonSerializationData<T>> | The action to call when the conversion is complete. |
Type parameters: T: The type to create.
Serialize
public static void Serialize<T>(
T value,
Action<JsonSerializationData<T>> done
)Converts the given object to a Json string
| Parameter | Type | Description |
|---|---|---|
value | T | The object to be converted |
done | Action<JsonSerializationData<T>> | The action to call when the conversion is complete. |
Type parameters: T: The type of the object to convert. This can usually be inferred.
public static void Serialize<T>(
T value,
JsonSerializerOptions options,
Action<JsonSerializationData<T>> done
)Converts the given object to a Json string
| Parameter | Type | Description |
|---|---|---|
value | T | The object to be converted |
options | JsonSerializerOptions | Options to control the serialization. |
done | Action<JsonSerializationData<T>> | The action to call when the conversion is complete. |
Type parameters: T: The type of the object to convert. This can usually be inferred.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.