Logo GenPRES

Canonical Module

Serializes a Dto to canonical JSON for a digest and for the database, without whitespace and with fields in declared order, and reads JSON back. Arrays keep their order, a BigRational is written as numerator/denominator in lowest terms, and an option is written as its value or null.

Types

Type Description

BigRationalConverter

OptionConverter

An option as its value or null, instead of the union's Case and Fields.

PopulateResolver

Reads a class without a parameterless constructor, such as Order.Dto.Dto, by creating it uninitialized and setting its properties from the JSON. Records and unions use the Newtonsoft construction.

Functions and values

Function or value Description

deserialize s

Full Usage: deserialize s

Parameters:
    s : string

Returns: 'a
Type parameters: 'a
s : string
Returns: 'a

serialize x

Full Usage: serialize x

Parameters:
    x : 'a

Returns: string
Type parameters: 'a
x : 'a
Returns: string

settings

Full Usage: settings

Returns: JsonSerializerSettings

Type something to start searching.