Skip to content

Version 0.12

Compare
Choose a tag to compare
@Tarmil Tarmil released this 21 Jul 19:41
  • #56: Add JsonUnionEncoding.UnwrapRecordCases, which implies JsonUnionEncoding.NamedFields and encodes union cases containing a single record field as if the record's fields were the union's fields instead. For example:
    type U =
        | U of r: {| x: int; y: bool |}
    
    U {| x = 1; y = true |}
    // Serialized as: {"Case":"U","Fields":{"x":1,"y":true}}
    // Instead of:    {"Case":"U","Fields":{"r":{"x":1,"y":true}}}
    This option is compatible with all union formats (AdjacentTag, ExternalTag, InternalTag and Untagged).
  • #64: Fix serialization of unit as field of an F# type. Thanks @NickDarvey!