Class JsonSerializedField

Version: 21.x

Encapsulates a System.Text.Json.JsonDocument for later deserialization as a Field.

Inheritance
System.Object
JsonSerializedField
Implements
Namespace: Sitecore.LayoutService.Client.Json.Fields
Assembly: Sitecore.LayoutService.Client.Json.dll
Syntax
RequestResponse
public class JsonSerializedField : FieldReader, IFieldReader

Constructors

JsonSerializedField(JsonSerializerOptions, JsonDocument)

Initializes a new instance of the JsonSerializedField class.

Declaration
RequestResponse
public JsonSerializedField(JsonSerializerOptions options, JsonDocument doc)
Parameters
TypeNameDescription
System.Text.Json.JsonSerializerOptionsoptions

The serializer options for later processing of the field.

System.Text.Json.JsonDocumentdoc

The instance of System.Text.Json.JsonDocument for later deserialization.

Methods

HandleRead(Type)

Returns an instance of the Field data as a specified type.

Declaration
RequestResponse
protected override object HandleRead(Type type)
Parameters
TypeNameDescription
System.Typetype

The type to read the field as.

Returns
TypeDescription
System.Object

A new instance of the specified type.

Overrides

Implements

Do you have some feedback for us?

If you have suggestions for improving this article,