Releases: Tarmil/FSharp.SystemTextJson
Releases · Tarmil/FSharp.SystemTextJson
Version 0.8
-
#30: Unwrap
'T voption
withJsonUnionEncoding.UnwrapOption
. Thanks @johlrich! -
#32: Add
JsonUnionEncoding.UnwrapSingleFieldCases
, which encodes the field of single-field cases asx
instead of[x]
. Include it inJsonUnionEncoding.FSharpLuLike
. -
#33: Fix "read too much or not enough" when parsing a list of unions with
JsonUnionEncoding.UnwrapFieldlessTags
. -
#36: BREAKING CHANGE: During deserialization, throw an exception when a field of a record or union has value
null
, unless the type of this field isoption
,voption
, or a union withUseNullAsTrueValue
. Thanks @drhumlen!New option
allowNullFields
disables this behavior. -
#38: Add more consistent names for options:
BareFieldlessTags
becomesUnwrapFieldlessTags
;SuccintOption
becomesUnwrapOption
;EraseSingleCaseUnions
becomesUnwrapSingleCaseUnions
.
The previous names are marked
Obsolete
.
Version 0.7
- #3: Add support for
PropertyNamingPolicy
on record and union fields. - #22: Add support for
DictionaryKeyPolicy
forMap<string, 'T>
. - #27: Add
unionTagNamingPolicy
option toJsonFSharpConverter
andJsonFSharpConverterAttribute
to customize the naming policy for union tag names. - #26: Add
JsonUnionEncoding.EraseSingleCaseUnions
, which encodes single-case single-field unions the same as the value in the field.
BREAKING CHANGE: This is now the default option. - #5: Add support for
PropertyNameCaseInsensitive
on record and union fields.
AddunionTagCaseInsensitive
option toJsonFSharpConverter
andJsonFSharpConverterAttribute
to customize the case sensitivity for union tag names.
Version 0.6
- #4: Add support for standard option
IgnoreNullValues
on record and union fields. - #13: Add support for
JsonPropertyNameAttribute
on union cases to set the tag name to use for this case. - #16: Add
JsonUnionEncoding.SuccintOption
, which encodesSome x
the same asx
.
BREAKING CHANGE: This is now the default option. - Add
unionTagName
andunionFieldsName
option to customize the"Case"
and"Fields"
tags for unions. - Add
JsonUnionEncoding.FSharpLuLike
, which is equivalent toExternalTag ||| BareFieldlessTags ||| SuccintOption
.
Verson 0.5
New features
- #17 Add encoding of collections:
'T list
encoded as JSON array.Set<'T>
encoded as JSON array.Map<string, 'T>
encoded as JSON object with map keys as field names.Map<'K, 'V>
when'K
is notstring
encoded as JSON array whose elements are[key,value]
JSON arrays.- Tuples and struct tuples encoded as JSON array.
Version 0.4
New features
- #6 Add different encodings for F# unions.
JsonFSharpConverter
andJsonFSharpConverterAttribute
now takeJsonUnionEncoding
as optional argument.- Unions are encoded depending on the
JsonUnionEncoding
as detailed in the documentation.
Version 0.3
Version 0.2
Version 0.1
Initial release.
- Serialize and deserialize F# unions and struct unions.
- Serialize and deserialize F# records, struct records and anonymous records.