C# Class Felinesoft.UmbracoCodeFirst.DataTypes.UmbracoJsonDataType

A data type base which allows the derived type to be serialised to and deserialised from JSON using JsonConvert
Inheritance: IUmbracoNtextDataType
Show file Open project: DanMannMann/UmbracoCodeFirst

Public Methods

Method Description
Initialise ( string dbValue ) : void

Initialises the current instance with the values deserialised from the given JSON string

Serialise ( ) : string

Serialises the current instance to a JSON string

Protected Methods

Method Description
UmbracoJsonDataType ( JsonSerializerSettings serializerSettings ) : System

Constructs a new instance of UmbracoJsonDataType

UmbracoJsonDataType ( NullValueHandling nullHandling = NullValueHandling.Include ) : System

Constructs a new instance of UmbracoJsonDataType

Method Details

Initialise() public method

Initialises the current instance with the values deserialised from the given JSON string
public Initialise ( string dbValue ) : void
dbValue string The JSON string
return void

Serialise() public method

Serialises the current instance to a JSON string
public Serialise ( ) : string
return string

UmbracoJsonDataType() protected method

Constructs a new instance of UmbracoJsonDataType
protected UmbracoJsonDataType ( JsonSerializerSettings serializerSettings ) : System
serializerSettings Newtonsoft.Json.JsonSerializerSettings Defines how (de)serialisation is done by Newtonsoft JSON
return System

UmbracoJsonDataType() protected method

Constructs a new instance of UmbracoJsonDataType
protected UmbracoJsonDataType ( NullValueHandling nullHandling = NullValueHandling.Include ) : System
nullHandling NullValueHandling Defines how null properties are serialised
return System