FSharp.SystemTextJson icon indicating copy to clipboard operation
FSharp.SystemTextJson copied to clipboard

.NET 5 nullref exception

Open lfr opened this issue 5 years ago • 0 comments

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.

lfr avatar Dec 03 '20 10:12 lfr