Class JsonSerializedField
- Namespace
- Sitecore.AspNetCore.SDK.LayoutService.Client.Serialization.Fields
- Assembly
- Sitecore.AspNetCore.SDK.LayoutService.Client.dll
Encapsulates a JsonDocument for later deserialization as a Field.
public class JsonSerializedField : FieldReader, IFieldReader
- Inheritance
-
JsonSerializedField
- Implements
- Inherited Members
Remarks
Initializes a new instance of the JsonSerializedField class.
Constructors
JsonSerializedField(JsonDocument)
Encapsulates a JsonDocument for later deserialization as a Field.
public JsonSerializedField(JsonDocument doc)
Parameters
doc
JsonDocumentThe instance of JsonDocument for later deserialization.
Remarks
Initializes a new instance of the JsonSerializedField class.
Methods
GetRawValue()
Gets the raw JSON string representation of the field.
public string GetRawValue()
Returns
- string
A string containing the raw JSON data.
HandleRead(Type)
Returns an instance of the Field data as a specified type.
protected override object? HandleRead(Type type)
Parameters
type
TypeThe type to read the field as.
Returns
- object
A new instance of the specified type.