Logo Xantham

ValueOptionConverter<'T> Type

`System.Text.Json` has no native understanding of `voption`, and the generated records use it for every field the schema marks optional. Reading is the easy half; the writing half matters more, because the server distinguishes an absent field from an explicit null - `ValueNone` must vanish from the payload rather than serialise as `null`. That omission is what the generated `JsonIgnoreCondition.WhenWritingDefault` attributes buy: `ValueNone` is the default value of the struct, so the property is skipped before this converter is ever asked to write it.

Constructors

Constructor Description

ValueOptionConverter()

Full Usage: ValueOptionConverter()

Returns: ValueOptionConverter<'T>
Returns: ValueOptionConverter<'T>

Type something to start searching.