Table of Contents

Class TableBaseIndexDefinitionConverter

Namespace
DataStax.AstraDB.DataApi.SerDes
Assembly
DataStax.AstraDB.DataApi.dll

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

indexType string

The 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

reader Utf8JsonReader

The reader.

typeToConvert Type

The type to convert.

options JsonSerializerOptions

An 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

writer Utf8JsonWriter

The writer to write to.

value TableBaseIndexDefinition

The value to convert to JSON.

options JsonSerializerOptions

An object that specifies serialization options to use.