![]() |
C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
Json converter helper class. More...
Public Member Functions | |
override bool | CanConvert (Type objectType) |
Determines if this converter is designed for deserialization to objects of the specified type. | |
override object | ReadJson (JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) |
Parses the json to the specified type. | |
override void | WriteJson (JsonWriter writer, object value, JsonSerializer serializer) |
Serializes to the specified type. | |
Static Public Member Functions | |
static JsonReader | CopyReaderForObject (JsonReader reader, JObject jObject) |
Creates a new reader for the specified jObject by copying the settings from an existing reader. | |
Protected Member Functions | |
T | Create (Type objectType, JObject jObject) |
Create an instance of objectType, based properties in the JSON object. | |
Json converter helper class.
Base Generic JSON Converter that can help quickly define converters for specific types by automatically generating the CanConvert, ReadJson, and WriteJson methods, requiring the implementer only to define a strongly typed Create method.
Definition at line 13 of file JsonCreationConverter[T].cs.
|
inline |
Determines if this converter is designed for deserialization to objects of the specified type.
objectType | The target type for deserialization. |
Definition at line 21 of file JsonCreationConverter[T].cs.
|
inlinestatic |
Creates a new reader for the specified jObject by copying the settings from an existing reader.
reader | The reader whose settings should be copied. |
jObject | The jObject to create a new reader for. |
Definition at line 14 of file JsonCreationConverter.cs.
|
abstractprotected |
Create an instance of objectType, based properties in the JSON object.
objectType | The type of object expected. |
jObject | The contents of JSON object that will be deserialized. |
|
inline |
Parses the json to the specified type.
reader | Newtonsoft.Json.JsonReader |
objectType | Target type. |
existingValue | Ignored |
serializer | Newtonsoft.Json.JsonSerializer to use. |
Definition at line 34 of file JsonCreationConverter[T].cs.
|
inline |
Serializes to the specified type.
writer | Newtonsoft.Json.JsonWriter |
value | The object to serialize. |
serializer | The Newtonsoft.Json.JsonSerializer to use. |
Definition at line 65 of file JsonCreationConverter[T].cs.