-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix InvalidCastException when casting a polymorphic converter #73259
Fix InvalidCastException when casting a polymorphic converter #73259
Conversation
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsHas been largely fixed thanks to the infrastructural changes in #70435 and #72789. This adds a fix for the case of dictionary converters that was missed out and includes a regression test for the original bug report. Fix #46522.
|
I've expanded the scope of this PR somewhat, incorporating equivalent fixes & testing for the serialization case. The PR also includes a few additional changes, tidying up logic around the casting converter and ensuring we never layer multiple casting converters on top of each other. |
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfoOfT.cs
Outdated
Show resolved
Hide resolved
…ion/Metadata/JsonTypeInfoOfT.cs
Has been largely fixed thanks to the infrastructural changes in #70435 and #72789. This adds a fix for the case of dictionary converters that was missed out and includes a regression test for the original bug report.
Fix #46522.