Class TypeArrayConverter

Writes the FullName property for a System.Type instead of the FullyQualifiedName.

Inheritance
System.Object
TypeArrayConverter
Namespace: EPiServer.Shell.Json
Assembly: EPiServer.Shell.dll
Version: 8.11.0
Syntax
[ServiceConfiguration(typeof(JsonConverter))]
public class TypeArrayConverter : JsonConverter

Constructors

TypeArrayConverter()

Declaration
public TypeArrayConverter()

Methods

CanConvert(Type)

Determines whether this instance can convert the specified object type.

Declaration
public override bool CanConvert(Type objectType)
Parameters
Type Name Description
System.Type objectType

Type of the object.

Returns
Type Description
System.Boolean

true if the type is Identity; otherwise, false.

ReadJson(JsonReader, Type, Object, JsonSerializer)

Reads the JSON representation of the object and returns an Identity instance.

Declaration
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Parameters
Type Name Description
Newtonsoft.Json.JsonReader reader

The Newtonsoft.Json.JsonReader to read from.

System.Type objectType

Type of the target object.

System.Object existingValue

The existing value of object being read.

Newtonsoft.Json.JsonSerializer serializer

The calling serializer.

Returns
Type Description
System.Object

The object value, or null if conversion failed.

WriteJson(JsonWriter, Object, JsonSerializer)

Writes the JSON representation of the Identity object to the writer.

Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
Type Name Description
Newtonsoft.Json.JsonWriter writer

The Newtonsoft.Json.JsonWriter to write to.

System.Object value

The value being converted.

Newtonsoft.Json.JsonSerializer serializer

The calling serializer.