Table of Contents

Namespace VpnHood.Net.Toolkit.Converters

Classes

ArrayConverter<T, TConverter>

Converts an array to and from a JSON array, each item through another converter.

IPAddressConverter

Converts an IPAddress to and from its text form, such as 192.168.0.1 or ::1.

IPEndPointConverter

Converts an IPEndPoint to and from its text form, such as 192.168.0.1:443 or [::1]:443.

JsonEnumFallbackAttribute

Specifies the value JsonStringEnumFallbackConverter<TEnum> reads for a name the enum does not have: the one a reader takes when the other side is newer, so it must be safe to act on, such as an error for an unknown error code, or the fail-closed mode for an unknown mode.

JsonStringEnumFallbackConverter<TEnum>

Converts an enum by its name, as JsonStringEnumConverter does, but reads a name this side does not know, one a newer app, engine or server added, as the enum's fallback instead of failing the whole document.

NullToEmptyArrayConverter<T>

Converts an array, reading JSON null as an empty array.

TimeSpanConverter

Converts a TimeSpan to its text form, such as 00:05:00, and reads that form or a number of seconds.

VersionConverter

Converts a Version to and from its text form, such as 1.2.3.4.