Wanzyee Studio
JsonNetSerializer

Serialize data with Newtonsoft.Json.JsonConvert. More...

Inherits ISerializer.

Public Member Functions

string Serialize< T > (T data)
 Serialize the specified data to text. More...
 
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 JsonNetSerializer instance = new JsonNetSerializer()
 The singleton instance. More...
 

Detailed Description

Serialize data with Newtonsoft.Json.JsonConvert.

Member Function Documentation

string Serialize< T > ( data)

Serialize the specified data to text.

Template Parameters
TData type.
Parameters
dataData.
Returns
Text.

Implements ISerializer.

T Deserialize< T > ( string  text)

Deserialize the specified text to create new data.

Template Parameters
TData type.
Parameters
textText.
Returns
Data.

Implements ISerializer.

void Overwrite< T > ( string  text,
data 
)

Deserialize the specified text to overwrite a existing data.

Template Parameters
TData type.
Parameters
textText.
dataData.

Implements ISerializer.

Member Data Documentation

readonly JsonNetSerializer instance = new JsonNetSerializer()
static

The singleton instance.

bool indent = false

If to indent the serialized text.