Tarmil / FSharp.SystemTextJson

System.Text.Json extensions for F# types
MIT License
329 stars 45 forks source link

.NET 5 nullref exception #81

Open lfr opened 3 years ago

lfr commented 3 years ago

Upon upgrading to .NET 5 I suddenly start getting a nullref exception that I didn't get before. Turns out one of my records was expecting an int for which the deserializing json didn't contain the corresponding member. After changing from int to int option, the nullref went away.

The exception thrown by this scenario needs to be refined so it's meaningful to the caller, otherwise the current behavior seems ok.