Skip to content

Abblix.Utils.Json Namespace

Classes
ArrayConverter<TElement,TConverter>JSON converter for nullable-element arrays of TElement. Each non-null element is delegated to an instance of TConverter; each null element is preserved as default() on read and emitted as a JSON null on write, independently of how the inner converter would handle null. A whole-array JSON null deserializes to a null array. Read accepts any JSON value form the inner converter can consume (string, number, boolean, object, nested array), keeping it symmetric with whatever Write can produce.
Base64UrlTextEncoderConverterA JSON converter for handling the serialization and deserialization of byte arrays as Base64 URL-encoded strings.
CultureInfoConverterA custom JSON converter for System.Globalization.CultureInfo objects. It allows for the serialization and deserialization of System.Globalization.CultureInfo instances when working with JSON data.
DateTimeOffsetUnixTimeSecondsConverterA custom JSON converter for handling System.DateTimeOffset objects. Converts to and from Unix time, which is the number of seconds that have elapsed since 00:00
UTC on 1 January 1970.
JsonIgnoreNullsAttributeMarks a class or struct so that all nullable properties are omitted from the serialized JSON when their value is null, without requiring a per-property System.Text.Json.Serialization.JsonIgnoreAttribute on each one.
JsonIgnoreNullsModifierProvides a System.Text.Json.Serialization.Metadata.JsonTypeInfo modifier that enforces null-omission for all nullable properties of types decorated with JsonIgnoreNullsAttribute.
SingleOrArrayConverter<T>Reads and writes a JSON value that may be either a single element of T or an array of such elements, exposing it uniformly to .NET as T[]. On write, a single-element array is emitted as a bare scalar (not an array), matching the OAuth 2.0 / OpenID Connect convention used for parameters such as aud and response_type.
SpaceSeparatedValuesConverterA custom JSON converter that handles arrays of strings, converting them to and from space-separated values in JSON.
TimeSpanSecondsConverterA custom JSON converter for TimeSpan objects that serializes and deserializes them as a number of seconds.