Version 1.2
-
#154: Add
SkippableOptionFieldsenum to further customize the skipping of fields of typeoptionandvoptionwithWithSkippableOptionFields.SkippableOptionFields.FromJsonSerializerOptionsis the default and equivalent toWithSkippableOptionFields(false): fields of typeoptionandvoptionare skipped if used withJsonIgnoreCondition.WhenWritingNull.SkippableOptionFields.Alwaysis equivalent toWithSkippableOptionFields(true): fields of typeoptionandvoptionare always skipped.SkippableOptionFields.Never: fields of typeoptionandvoptionare never skipped.
-
#159: Throw an exception when trying to deserialize
nullinto 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.Objectalways serializes maps as objects. The key type must be supported as key for dictionaries.
NOTE: This requires System.Text.Json 8.0.MapFormat.ArrayOfPairsalways serializes maps as JSON arrays whose items are[key,value]pairs.MapFormat.ObjectOrArrayOfPairsis 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
StructuralComparisonto the typeSkippable<_>. -
#164: When deserializing a record with
JsonIgnoreCondition.WhenWritingNull, when a non-nullable field is missing, throw a properJsonExceptionrather than aNullReferenceException.