Class IdentifierConverter
Provides support for converting IdentifierTriples to and from JSON.
Inheritance
System.Object
IdentifierConverter
Namespace: Algenta.Colectica.Model.Ddi.Utility
Assembly: Algenta.Colectica.Model.Ddi.dll
Syntax
public class IdentifierConverter : JsonConverter
Methods
CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration
public override bool CanConvert(Type objectType)
Parameters
Type | Name | Description |
---|---|---|
Type | objectType | Type of the object. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
JsonReader | reader | The Newtonsoft.Json.JsonReader to read from. |
Type | objectType | Type of the object: should be either IdentifierTriple or TypedIdTriple. |
System.Object | existingValue | The existing value of object being read. |
JsonSerializer | serializer | The calling serializer. |
Returns
Type | Description |
---|---|
System.Object | The object value. |
WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the identifier.
Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
JsonWriter | writer | The Newtonsoft.Json.JsonWriter to write to. |
System.Object | value | The IdentifierTriple or TypedIdTriple to convert. |
JsonSerializer | serializer | The calling serializer. |