Class TableBaseIndexDefinitionConverter
Custom converter for polymorphic deserialization of TableBaseIndexDefinition based on the indexType field from the parent TableIndexMetadata object.
public class TableBaseIndexDefinitionConverter : JsonConverter<TableBaseIndexDefinition>
- Inheritance
-
TableBaseIndexDefinitionConverter
- Inherited Members
Constructors
TableBaseIndexDefinitionConverter(string)
Initializes a converter that selects a concrete table index definition type from the supplied index type.
public TableBaseIndexDefinitionConverter(string indexType)
Parameters
indexTypestringThe Data API index type name used to choose the concrete definition type.
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type TableBaseIndexDefinition.
public override TableBaseIndexDefinition Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
readerUtf8JsonReaderThe reader.
typeToConvertTypeThe type to convert.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.
Returns
- TableBaseIndexDefinition
The converted value.
Write(Utf8JsonWriter, TableBaseIndexDefinition, JsonSerializerOptions)
Writes a specified value as JSON.
public override void Write(Utf8JsonWriter writer, TableBaseIndexDefinition value, JsonSerializerOptions options)
Parameters
writerUtf8JsonWriterThe writer to write to.
valueTableBaseIndexDefinitionThe value to convert to JSON.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.