Table of Contents

Class IpAddressConverter

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

JSON converter for IPAddress, serializing and deserializing IP addresses as their standard string representation (e.g., "192.168.1.1" or "::1").

public class IpAddressConverter : JsonConverter<IPAddress>
Inheritance
IpAddressConverter
Inherited Members

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts a JSON string to an IPAddress value.

public override IPAddress Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader
typeToConvert Type
options JsonSerializerOptions

Returns

IPAddress

Write(Utf8JsonWriter, IPAddress, JsonSerializerOptions)

Writes an IPAddress value as a JSON string.

public override void Write(Utf8JsonWriter writer, IPAddress value, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter
value IPAddress
options JsonSerializerOptions