Class DeviceJsonConverter

Version: 21.x

Handles conversion of a presentation device list.

Inheritance

System.Object

DeviceJsonConverter

Namespace: Sitecore.LayoutService.Client.Newtonsoft.Converters

Assembly: Sitecore.LayoutService.Client.Newtonsoft.dll

Syntax
public class DeviceJsonConverter : JsonConverter<List<Device>>

Constructors

DeviceJsonConverter()

Declaration
public DeviceJsonConverter()

Properties

CanWrite

Declaration
public override bool CanWrite { get; }
Property Value
TypeDescription
System.Boolean

Methods

ReadJson(JsonReader, Type, List, Boolean, JsonSerializer)

Declaration
public override List<Device> ReadJson(JsonReader reader, Type objectType, List<Device> existingValue, bool hasExistingValue, JsonSerializer serializer)
Parameters
TypeNameDescription
Newtonsoft.Json.JsonReaderreader
System.TypeobjectType
System.Collections.Generic.List

<

Device

>
existingValue
System.BooleanhasExistingValue
Newtonsoft.Json.JsonSerializerserializer
Returns
TypeDescription
System.Collections.Generic.List

<

Device

>

WriteJson(JsonWriter, List, JsonSerializer)

Declaration
public override void WriteJson(JsonWriter writer, List<Device> value, JsonSerializer serializer)
Parameters
TypeNameDescription
Newtonsoft.Json.JsonWriterwriter
System.Collections.Generic.List

<

Device

>
value
Newtonsoft.Json.JsonSerializerserializer
If you have suggestions for improving this article, let us know!