Version 1.0
-
#89: Add
JsonNameAttribute
as a more powerful substitute for the standardJsonPropertyNameAttribute
.- When used on a discriminated union case,
JsonNameAttribute
can take a value of typeint
orbool
instead ofstring
. JsonNameAttribute
can take multiple values. When deserializing, all these values are treated as equivalent. When serializing, the first one is used.JsonNameAttribute
has a settable propertyField: string
. It is used to set the JSON name of a union case field with the given name.
- When used on a discriminated union case,
-
#92: Serialization of record properties (in addition to fields).
- Add option
includeRecordProperties: bool
to enable serializing record properties. - Also serialize record properties with
JsonIncludeAttribute
even whenincludeRecordProperties
is false.
- Add option
-
Add support for the standard
DefaultIgnoreCondition.WhenWritingNull
as a synonym forIgnoreNullValues = true
that allowsNone
andValueNone
to be omitted instead ofnull
. -
#123: BREAKING CHANGE: Missing fields of type
option
orvoption
now throw an error by default instead of being deserialized toNone
/ValueNone
. To support missing fields, either enable the optionIgnoreNullValues = true
orDefaultIgnoreCondition = WhenWritingNull
, or use the typeSkippable
instead ofoption
orvoption
. -
#126: Add option
types: JsonFSharpTypes
that specifies which types the F# converter should handle. Unlisted types will be handled by the defaultSystem.Text.Json
. By default, all supported types are handled.