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

[release/6.0] Make delegates unsupported by JsonSerializer #63514

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 7, 2022

Backport of #63495 to release/6.0

Customer Impact

Fixes customer reported JSON source gen issue #62354. The code generated when delegate types were encountered in user object graphs was invalid, causing compilation failures in user apps. This change explicitly treats the types as unsupported by both reflection and source-gen serializers, which avoids invalid code being generated for the types. This is not a breaking change since the reflection serializer was already throwing exceptions when handling these types.

Users cannot currently workaround the bug, even with [JsonIgnore] (aside from sticking with the reflection serialzer). A fix is ideal to unblock users with such object graphs.

Testing

Appropriate tests were added for the scenario.

Risk

Very low. Change is very small and scoped to the issue. Added tests.

@ghost
Copy link

ghost commented Jan 7, 2022

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

Issue Details

Backport of #63495 to release/6.0

/cc @layomia

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-System.Text.Json

Milestone: -

@layomia
Copy link
Contributor

layomia commented Jan 10, 2022

Approved by tactics via email.

@ericstj ericstj modified the milestones: 6.0.x, 6.0.2 Jan 10, 2022
@safern safern merged commit 3f6d8fa into release/6.0 Jan 10, 2022
@safern safern deleted the backport/pr-63495-to-release/6.0 branch January 10, 2022 22:35
@ghost ghost locked as resolved and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Text.Json Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants