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
RequestResponse
public class DeviceJsonConverter : JsonConverter<List<Device>>

Constructors

DeviceJsonConverter()

Declaration
RequestResponse
public DeviceJsonConverter()

Properties

CanWrite

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

Methods

ReadJson(JsonReader, Type, List<Device>, Boolean, JsonSerializer)

Declaration
RequestResponse
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<Device>, JsonSerializer)

Declaration
RequestResponse
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

Do you have some feedback for us?

If you have suggestions for improving this article,