Skip to content

Codec

module Codec
AssemblyThoth.Json.Core
Attributes[<RequireQualifiedAccess>]

Functions and values

field<'u, 't> (fieldName: string) (picker: 'u -> 't) (fieldCodec: Codec<'t>) : ObjectCodecFieldSet<'t,'u>

A required property of an objectCodec block: its name, how to read it out of the value, and the codec for it.

optional<'u, 't> (fieldName: string) (picker: 'u -> 't option) (fieldCodec: Codec<'t>) : ObjectCodecFieldSet<'t option,'u>

An optional property of an objectCodec block. It is left out when the value is None, and its absence decodes back to None.