View Source
Class JsonReadConverter<T>
Provides a base class for custom implementations.
Inheritance
System.Object
Assembly: Umbraco.Infrastructure.dll
Syntax
public abstract class JsonReadConverter<T> : JsonConverter
Type Parameters
Name |
Description |
T |
The type of the converted object.
|
Methods
View Source
CanConvert(Type)
Declaration
public override bool CanConvert(Type objectType)
Parameters
Type |
Name |
Description |
Type |
objectType |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Create(Type, String, JObject)
Create an instance of objectType, based properties in the JSON object
Declaration
protected abstract T Create(Type objectType, string path, JObject jObject)
Parameters
Type |
Name |
Description |
Type |
objectType |
type of object expected
|
System.String |
path |
The path of the current json token.
|
JObject |
jObject |
contents of JSON object that will be deserialized
|
Returns
View Source
Deserialize(JObject, T, JsonSerializer)
Declaration
protected virtual void Deserialize(JObject jobject, T target, JsonSerializer serializer)
Parameters
Type |
Name |
Description |
JObject |
jobject |
|
T |
target |
|
JsonSerializer |
serializer |
|
View Source
ReadJson(JsonReader, Type, Object, JsonSerializer)
Declaration
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Parameters
Type |
Name |
Description |
JsonReader |
reader |
|
Type |
objectType |
|
System.Object |
existingValue |
|
JsonSerializer |
serializer |
|
Returns
Type |
Description |
System.Object |
|
View Source
WriteJson(JsonWriter, Object, JsonSerializer)
Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
Type |
Name |
Description |
JsonWriter |
writer |
|
System.Object |
value |
|
JsonSerializer |
serializer |
|