Class JsonSerializedField

Version: 21.x

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

Inheritance

System.Object

FieldReader

JsonSerializedField

Implements

IFieldReader

Inherited Members

FieldReader.Read()

FieldReader.TryRead(TField)

FieldReader.TryRead(Type, IField)

FieldReader.Read(Type)

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.JsonSerializerOptionsoptionsThe serializer options for later processing of the field.
System.Text.Json.JsonDocumentdocThe 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.TypetypeThe type to read the field as.
Returns
TypeDescription
System.ObjectA new instance of the specified type.
Overrides

FieldReader.HandleRead(Type)

Implements

IFieldReader

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