Header menu logo JDeck

Builders Module

Provides an in-the-box computation expression that can be used to decode JSON elements. Ideally you should use https://github.com/demystifyfp/FsToolkit.ErrorHandling instead of this as it is much more complete and would allow you to handle decoding workflows in a more robust way. However, if you don't want to take a dependency on FsToolkit.ErrorHandling, this should be just enough for you.

Types

Type Description

DecodeBuilder

Functions and values

Function or value Description

decode

Full Usage: decode

Returns: DecodeBuilder

Computation expression to seamlessly decode JSON elements.

Returns: DecodeBuilder
Example

   type Person = { Name: string; Age: int }
   let PersonDecoder = decode {
     let! name = Property.get "name" Decode.Required.string
     and! age = Property.get "age" Decode.Required.int
     return { Name = name; Age = age }
   }
type Person = { Name: string Age: int }
Multiple items
val string: value: 'T -> string

--------------------
type string = System.String
Multiple items
val int: value: 'T -> int (requires member op_Explicit)

--------------------
type int = int32

--------------------
type int<'Measure> = int
val PersonDecoder: obj

Type something to start searching.