-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json.net can't deserialize simple struct, throws System.NullReferenceException #67781
Comments
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsDescriptionSystem.Text.Json is unable to deserialize a very basic struct Reproduction Steps
Result
See fiddle here https://dotnetfiddle.net/n21G3a Expected behaviorNo exception. And if something is wrong with class/struct declaration, throw a more descriptive exception. Actual behaviorThrows null reference Regression?No response Known WorkaroundsNo response ConfigurationNo response Other informationNo response
|
Likely dupe of #62983 (fixed in 7.0) |
Can confirm that the issue has been resolved with the latest builds in .NET 7 |
Should we consider for backport? |
I asked that in #62989 but since nobody responded I didn't file one |
I'm guessing it got dropped because it happened over the holidays. I think we should backport it. |
Ok, I'll file a backport |
Description
System.Text.Json is unable to deserialize a very basic struct
Reproduction Steps
Result
See fiddle here https://dotnetfiddle.net/n21G3a
Expected behavior
No exception. And if something is wrong with class/struct declaration, throw a more descriptive exception.
Actual behavior
Throws null reference
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: