I didn't see this in the docs so I thought I'd mention it here: when registering a custom JsonConverter for a type in JsonFSharpTypes (e.g. records), it seems necessary to add it to the JsonSerializerOptions.Converters list before adding the json fsharp serializer options with AddToJsonSerializerOptions. Otherwise the fsharp record converter takes precedence.
Adding the JsonConverter directly to the record doesn't seem to take precedence. And it doesn't seem like using ToJsonSerializerOptions would work either.
Thanks for making this!
I didn't see this in the docs so I thought I'd mention it here: when registering a custom
JsonConverter
for a type inJsonFSharpTypes
(e.g. records), it seems necessary to add it to theJsonSerializerOptions.Converters
list before adding the json fsharp serializer options withAddToJsonSerializerOptions
. Otherwise the fsharp record converter takes precedence.Adding the
JsonConverter
directly to the record doesn't seem to take precedence. And it doesn't seem like usingToJsonSerializerOptions
would work either.