API Reference
Interface
IPAddressJsonConverter
Converts IPAddress values to and from JSON.
Methods
Read(System.Text.Json.Utf8JsonReader@ reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) #Reads an IPAddress from the JSON reader.
Parameters
- reader System.Text.Json.Utf8JsonReader@
- The JSON reader instance.
- typeToConvert System.Type
- The type to convert.
- options System.Text.Json.JsonSerializerOptions
- Serialization options.
Returns
The parsed IPAddress.
Exceptions
FormatException– Value is not a valid IP address.
Write(System.Text.Json.Utf8JsonWriter writer, System.Net.IPAddress value, System.Text.Json.JsonSerializerOptions options) #Writes the specified IPAddress to the JSON writer.
Parameters
- writer System.Text.Json.Utf8JsonWriter
- The JSON writer to use.
- value System.Net.IPAddress
- The IP address value.
- options System.Text.Json.JsonSerializerOptions
- Serialization options.