Class JsonSerializedField
Version: 21.x
Encapsulates a System.Text.Json.JsonDocument for later deserialization as a Field.
Implements
Inherited Members
Namespace: Sitecore.LayoutService.Client.Json.Fields
Assembly: Sitecore.LayoutService.Client.Json.dll
Syntax
RequestResponse
public class JsonSerializedField : FieldReader, IFieldReaderConstructors
JsonSerializedField(JsonSerializerOptions, JsonDocument)
Initializes a new instance of the JsonSerializedField class.
Declaration
RequestResponse
public JsonSerializedField(JsonSerializerOptions options, JsonDocument doc)Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.Json.JsonSerializerOptions | options |
The serializer options for later processing of the field. |
| System.Text.Json.JsonDocument | doc |
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
| Type | Name | Description |
|---|---|---|
| System.Type | type |
The type to read the field as. |
Returns
| Type | Description |
|---|---|
| System.Object |
A new instance of the specified type. |