Skip to content
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

System.Text.Json: Fix polymorphic state bug when using ReferenceHandler.IgnoreCycles #111808

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yesmey
Copy link
Contributor

@yesmey yesmey commented Jan 24, 2025

Clear the polymorphic state after ignoring a reference in an array to prevent subsequent objects from inheriting it.

Add a test which triggered an assertion in


and covers the scenario reported in #111790

Fixes #111790

Clear the polymorphic state after ignoring a reference to prevent subsequent object writes from inheriting it.
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 24, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Text.Json community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System.Text.Json polymorphism serialized with ReferenceHandler.IgnoreCycles
1 participant