-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Fix InvalidCastException when casting a polymorphic converter #73259
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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.