---
title: "Class DeviceJsonConverter"
slug: "sitecore.layoutservice.client.newtonsoft.converters.devicejsonconverter"
abstract: ""
---
# Class DeviceJsonConverter

Handles conversion of a presentation device list.

## Inheritance

System.Object

DeviceJsonConverter

### **Namespace**: Sitecore.LayoutService.Client.Newtonsoft.Converters

#### **Assembly**: Sitecore.LayoutService.Client.Newtonsoft.dll

##### Syntax

```csharp
public class DeviceJsonConverter : JsonConverter<List<Device>>

```

### Constructors

#### DeviceJsonConverter()

##### Declaration

```csharp
public DeviceJsonConverter()

```

### Properties

#### CanWrite

##### Declaration

```csharp
public override bool CanWrite { get; }

```

##### Property Value

| Type | Description |
| --- | --- |
| System.Boolean |  |

### Methods

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

##### Declaration

```csharp
public override List<Device> ReadJson(JsonReader reader, Type objectType, List<Device> existingValue, bool hasExistingValue, JsonSerializer serializer)

```

##### Parameters

| Type | Name | Description |
| --- | --- | --- |
| Newtonsoft.Json.JsonReader | reader |  |
| System.Type | objectType |  |
| System.Collections.Generic.List<br><br><<br><br>Device<br><br>> | existingValue |  |
| System.Boolean | hasExistingValue |  |
| Newtonsoft.Json.JsonSerializer | serializer |  |

##### Returns

| Type | Description |
| --- | --- |
| System.Collections.Generic.List<br><br><<br><br>Device<br><br>> |  |

#### WriteJson(JsonWriter, List<Device>, JsonSerializer)

##### Declaration

```csharp
public override void WriteJson(JsonWriter writer, List<Device> value, JsonSerializer serializer)

```

##### Parameters

| Type | Name | Description |
| --- | --- | --- |
| Newtonsoft.Json.JsonWriter | writer |  |
| System.Collections.Generic.List<br><br><<br><br>Device<br><br>> | value |  |
| Newtonsoft.Json.JsonSerializer | serializer |  |
