Closed nobleach closed 6 years ago
If looks like in one of the objects (the one with #100) in your list there is no field 'userId'. If field could be missing then it should be of option type, userId: int option in your case.
Yes, that solve this issue perfectly. Thank you so much!
This page mentions missing fields https://vsapronov.github.io/FSharp.Json/null_safety.html And here are some details about controlling null VS missing fields behaviour: https://vsapronov.github.io/FSharp.Json/null_safety.html#Customization-of-null-deserialization
Great! Thanks again.
I have a bit of JSON that looks like this:
I'm attempting to deserialize it like this:
I'm getting
Unhandled Exception: FSharp.Json.JsonDeserializationError: JSON Path: [100].userId. Non option field is missing
.I'm not sure what this means. I'd guess that the JSON is somehow missing that field. What is the correct step to take if I might expect that to be the case (I don't currently, but what if?)