Class PlaceholderFeatureConverter
Version: 21.x
Handles conversion of a Placeholder feature collection.
Inheritance
System.Object
PlaceholderFeatureConverter
Namespace: Sitecore.LayoutService.Client.Json.Converter
Assembly: Sitecore.LayoutService.Client.Json.dll
Syntax
RequestResponse
public class PlaceholderFeatureConverter : JsonConverter<Placeholder>Constructors
PlaceholderFeatureConverter(IFieldParser)
Initializes a new instance of the PlaceholderFeatureConverter class.
Declaration
RequestResponse
public PlaceholderFeatureConverter(IFieldParser fieldParser)Parameters
| Type | Name | Description |
|---|---|---|
| IFieldParser | fieldParser |
The field parser. |
Methods
CanConvert(Type)
Declaration
RequestResponse
public override bool CanConvert(Type typeToConvert)Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | typeToConvert |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Declaration
RequestResponse
public override Placeholder Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.Json.Utf8JsonReader | reader | |
| System.Type | typeToConvert | |
| System.Text.Json.JsonSerializerOptions | options |
Returns
| Type | Description |
|---|---|
| Placeholder |
Write(Utf8JsonWriter, Placeholder, JsonSerializerOptions)
Declaration
RequestResponse
public override void Write(Utf8JsonWriter writer, Placeholder value, JsonSerializerOptions options)Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.Json.Utf8JsonWriter | writer | |
| Placeholder | value | |
| System.Text.Json.JsonSerializerOptions | options |