System.Text.Json extensions for F# types
This library provides support for F# types to System.Text.Json.
It adds support for the following types:
F# records (including struct records and anonymous records);
F# discriminated unions (including struct unions), with a variety of representations;
It provides a number of customization options, allowing a wide range of JSON serialization formats.
'T optionas either just
null(or an absent field)?
Yes! Starting with v0.6, this is the default behavior. To supersede it, use an explicit
JsonUnionEncodingthat does not include
JsonIgnoreAttributeon record fields?
As little as possible, but unfortunately the
FSharp.ReflectionAPI requires some allocations. In particular, an array is allocated for as many items as the record fields or union arguments, and structs are boxed. There is work in progress to improve this.