C# Class Qowaiv.Json.QowaivJsonConverter

The Qowaiv JSON converter converts types from and to JSON that implement the Qowaiv.Json.IJsonSerializable.
Inheritance: Newtonsoft.Json.JsonConverter
Mostra file Open project: Corniel/Qowaiv Class Usage Examples

Public Methods

Method Description
CanConvert ( Type objectType ) : bool

Returns true if the object type is (nullable) IJsonSerializable.

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

Reads the JSON representation of an IJsonSerializable.

Register ( ) : void

Registers the Qowaiv JSON converter.

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

Writes the JSON representation of an IJsonSerializable.

Method Details

CanConvert() public method

Returns true if the object type is (nullable) IJsonSerializable.
public CanConvert ( Type objectType ) : bool
objectType System.Type /// The object type to convert. ///
return bool

ReadJson() public method

Reads the JSON representation of an IJsonSerializable.
public ReadJson ( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer ) : object
reader Newtonsoft.Json.JsonReader /// The Newtonsoft.Json.JsonReader to read from. ///
objectType System.Type /// The type of the object. ///
existingValue object /// The existing value of object being read. ///
serializer Newtonsoft.Json.JsonSerializer /// The calling serializer. ///
return object

Register() public static method

Registers the Qowaiv JSON converter.
public static Register ( ) : void
return void

WriteJson() public method

Writes the JSON representation of an IJsonSerializable.
public WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void
writer Newtonsoft.Json.JsonWriter /// The Newtonsoft.Json.JsonWriter to write to. ///
value object /// The value. ///
serializer Newtonsoft.Json.JsonSerializer /// The calling serializer. ///
return void