Serialize data with UnityEngine.JsonUtility.
More...
Inherits ISerializer.
Public Member Functions | |
| string | Serialize< T > (T data) |
| Serialize the specified data to text. More... | |
| T | Deserialize< T > (string text) |
| Deserialize the specified text to create new data. More... | |
| void | Overwrite< T > (string text, T data) |
| Deserialize the specified text to overwrite a existing data. More... | |
Public Attributes | |
| bool | indent = false |
| If to indent the serialized text. More... | |
Static Public Attributes | |
| static readonly UnityJsonSerializer | instance = new UnityJsonSerializer() |
| The singleton instance. More... | |
Serialize data with UnityEngine.JsonUtility.
| string Serialize< T > | ( | T | data | ) |
Serialize the specified data to text.
| T | Data type. |
| data | Data. |
Implements ISerializer.
| T Deserialize< T > | ( | string | text | ) |
Deserialize the specified text to create new data.
| T | Data type. |
| text | Text. |
Implements ISerializer.
| void Overwrite< T > | ( | string | text, |
| T | data | ||
| ) |
Deserialize the specified text to overwrite a existing data.
| T | Data type. |
| text | Text. |
| data | Data. |
Implements ISerializer.
|
static |
The singleton instance.
| bool indent = false |
If to indent the serialized text.