C# Class Catel.Runtime.Serialization.Json.CatelJsonConverter

Converts Catel models manually using the Catel serializer.
Inheritance: Newtonsoft.Json.JsonConverter
Show file Open project: Catel/Catel

Public Methods

Method Description
CanConvert ( Type objectType ) : bool

Determines whether this instance can convert the specified object type.

CatelJsonConverter ( IJsonSerializer jsonSerializer, ISerializationConfiguration configuration ) : System

Initializes a new instance of the CatelJsonConverter class.

ReadJson ( JsonReader reader, Type objectType, object existingValue, Newtonsoft serializer ) : object

Reads the json.

WriteJson ( JsonWriter writer, object value, Newtonsoft serializer ) : void

Writes the json.

Method Details

CanConvert() public method

Determines whether this instance can convert the specified object type.
public CanConvert ( Type objectType ) : bool
objectType System.Type Type of the object.
return bool

CatelJsonConverter() public method

Initializes a new instance of the CatelJsonConverter class.
public CatelJsonConverter ( IJsonSerializer jsonSerializer, ISerializationConfiguration configuration ) : System
jsonSerializer IJsonSerializer The json serializer.
configuration ISerializationConfiguration The configuration.
return System

ReadJson() public method

Reads the json.
public ReadJson ( JsonReader reader, Type objectType, object existingValue, Newtonsoft serializer ) : object
reader Newtonsoft.Json.JsonReader The reader.
objectType System.Type Type of the object.
existingValue object The existing value.
serializer Newtonsoft The serializer.
return object

WriteJson() public method

Writes the json.
public WriteJson ( JsonWriter writer, object value, Newtonsoft serializer ) : void
writer Newtonsoft.Json.JsonWriter The writer.
value object The value.
serializer Newtonsoft The serializer.
return void