Class NewtonsoftLayoutServiceSerializer

Version: 21.x

Handles JSON serialization for the Sitecore layout service.

Inheritance
System.Object
NewtonsoftLayoutServiceSerializer
Namespace: Sitecore.LayoutService.Client.Newtonsoft
Assembly: Sitecore.LayoutService.Client.Newtonsoft.dll
Syntax
RequestResponse
public class NewtonsoftLayoutServiceSerializer : Object, ISitecoreLayoutSerializer

Constructors

NewtonsoftLayoutServiceSerializer()

Declaration
RequestResponse
public NewtonsoftLayoutServiceSerializer()

Methods

CreateSerializerSettings()

Gets the default settings for the JSON serializer.

Declaration
RequestResponse
public static JsonSerializerSettings CreateSerializerSettings()
Returns
TypeDescription
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
TypeNameDescription
System.Stringdata

The data to deserialize.

Returns

Implements

Do you have some feedback for us?

If you have suggestions for improving this article,