1. JsonSerializedField

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
public class JsonSerializedField : FieldReader, IFieldReader

Constructors

JsonSerializedField(JsonSerializerOptions, JsonDocument)

Initializes a new instance of the JsonSerializedField class.

Declaration
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
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

If you have suggestions for improving this article, let us know!