Allows serializing and deserializing derived Analyze Re Resources to a target base type. (For instance deserializing a CatXL object to a base Layer object reference).
More...
|
| 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 JsonReader | CopyReaderForObject (JsonReader reader, JObject jObject) |
| | Creates a new reader for the specified jObject by copying the settings from an existing reader.
|
| |
Allows serializing and deserializing derived Analyze Re Resources to a target base type. (For instance deserializing a CatXL object to a base Layer object reference).
- Template Parameters
-
| T | The base for which we wish to support deserialization of derived types to. |
Definition at line 16 of file DerivedResourceCreationConverter.cs.
◆ CanConvert()
Determines if this converter is designed for deserialization to objects of the specified type.
- Parameters
-
| objectType | The target type for deserialization. |
- Returns
- True if the type is supported.
Definition at line 21 of file JsonCreationConverter[T].cs.
◆ CopyReaderForObject()
Creates a new reader for the specified jObject by copying the settings from an existing reader.
- Parameters
-
| reader | The reader whose settings should be copied. |
| jObject | The jObject to create a new reader for. |
- Returns
- The new disposable reader.
Definition at line 14 of file JsonCreationConverter.cs.
◆ Create()
Create a new instance of the requested resource type for deserialization of a JSON string.
- Parameters
-
| objectType | The requested type to convert the JObject to (can be a base type or interface). |
| jObject | The JSON object to be converted to the specified class type. |
- Returns
- A new instance of the type specified by the objectType, or a type that derives from the objectType if the JObject refers to a specific sub-type.
Definition at line 33 of file DerivedResourceCreationConverter.cs.
◆ ReadJson()
Parses the json to the specified type.
- Parameters
-
| reader | Newtonsoft.Json.JsonReader |
| objectType | Target type. |
| existingValue | Ignored |
| serializer | Newtonsoft.Json.JsonSerializer to use. |
- Returns
- Deserialized Object
Definition at line 34 of file JsonCreationConverter[T].cs.
◆ WriteJson()
Serializes to the specified type.
- Parameters
-
| 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.
The documentation for this class was generated from the following file: