Class NewtonsoftLayoutServiceSerializer
Version: 21.x
Handles JSON serialization for the Sitecore layout service.
Inheritance
System.Object
NewtonsoftLayoutServiceSerializer
Implements
Namespace: Sitecore.LayoutService.Client.Newtonsoft
Assembly: Sitecore.LayoutService.Client.Newtonsoft.dll
Syntax
RequestResponse
public class NewtonsoftLayoutServiceSerializer : Object, ISitecoreLayoutSerializerConstructors
NewtonsoftLayoutServiceSerializer()
Declaration
RequestResponse
public NewtonsoftLayoutServiceSerializer()Methods
CreateSerializerSettings()
Gets the default settings for the JSON serializer.
Declaration
RequestResponse
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.
Declaration
RequestResponse
public SitecoreLayoutResponseContent Deserialize(string data)Parameters
| Type | Name | Description |
|---|---|---|
| System.String | data |
The data to deserialize. |
Returns
| Type | Description |
|---|---|
| SitecoreLayoutResponseContent |
The deserialized SitecoreLayoutResponseContent. |