Tarmil / FSharp.SystemTextJson

System.Text.Json extensions for F# types
MIT License
323 stars 44 forks source link

Incorrect missing field name - seems to pick name of first null field, even if field is optional #178

Open cmeeren opened 5 months ago

cmeeren commented 5 months ago

Consider this type:

type A = { A: int option; B: bool }

When deserializing this:

"{\"A\": null}"

It fails with this message:

Missing field for record type A: A

It should fail with this message:

Missing field for record type A: B