Version 1.2
-
#154: Add
SkippableOptionFields
enum to further customize the skipping of fields of typeoption
andvoption
withWithSkippableOptionFields
.SkippableOptionFields.FromJsonSerializerOptions
is the default and equivalent toWithSkippableOptionFields(false)
: fields of typeoption
andvoption
are skipped if used withJsonIgnoreCondition.WhenWritingNull
.SkippableOptionFields.Always
is equivalent toWithSkippableOptionFields(true)
: fields of typeoption
andvoption
are always skipped.SkippableOptionFields.Never
: fields of typeoption
andvoption
are never skipped.
-
#159: Throw an exception when trying to deserialize
null
into a record or union in any context, rather than only when they are in fields of records and unions. -
#160: Fix
WithSkippableOptionFields(false)
not working forvoption
. -
#161: Allow using single-case unions as keys in all dictionary types.
NOTE: This requires System.Text.Json 8.0. -
#162: Add option
.WithMapFormat(MapFormat)
to customize the format of F# maps.MapFormat.Object
always serializes maps as objects. The key type must be supported as key for dictionaries.
NOTE: This requires System.Text.Json 8.0.MapFormat.ArrayOfPairs
always serializes maps as JSON arrays whose items are[key,value]
pairs.MapFormat.ObjectOrArrayOfPairs
is the default: maps whose keys are string or single-case unions wrapping string are serialized as JSON objects, and other maps are serialized as JSON arrays whose items are[key,value]
pairs.
-
#163: Add
StructuralComparison
to the typeSkippable<_>
. -
#164: When deserializing a record with
JsonIgnoreCondition.WhenWritingNull
, when a non-nullable field is missing, throw a properJsonException
rather than aNullReferenceException
.