---
title: "Class NewtonsoftLayoutServiceSerializer"
slug: "sitecore.layoutservice.client.newtonsoft.newtonsoftlayoutserviceserializer"
abstract: ""
---
# Class NewtonsoftLayoutServiceSerializer

Handles JSON serialization for the Sitecore layout service.

## Inheritance

System.Object

NewtonsoftLayoutServiceSerializer

### Implements

[ISitecoreLayoutSerializer](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.isitecorelayoutserializer.html)

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

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

##### Syntax

```csharp
public class NewtonsoftLayoutServiceSerializer : Object, ISitecoreLayoutSerializer

```

### Constructors

#### NewtonsoftLayoutServiceSerializer()

##### Declaration

```csharp
public NewtonsoftLayoutServiceSerializer()

```

### Methods

#### CreateSerializerSettings()

Gets the default settings for the JSON serializer.

##### Declaration

```csharp
public static JsonSerializerSettings CreateSerializerSettings()

```

##### Returns

| Type | Description |
| --- | --- |
| Newtonsoft.Json.JsonSerializerSettings | An instance of Newtonsoft.Json.JsonSerializerSettings with all serialization defaults for the Sitecore layout service. |

#### Deserialize(String)

Deserializes the given data to a [SitecoreLayoutResponseContent](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.response.sitecorelayoutresponsecontent.html).

##### Declaration

```csharp
public SitecoreLayoutResponseContent Deserialize(string data)

```

##### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | data | The data to deserialize. |

##### Returns

| Type | Description |
| --- | --- |
| SitecoreLayoutResponseContent | The deserialized [SitecoreLayoutResponseContent](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.response.sitecorelayoutresponsecontent.html). |

### Implements

[ISitecoreLayoutSerializer](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.isitecorelayoutserializer.html)
