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/7.0] Fix regression in JsonIgnoreAttribute handling of unsupported property types #76869

Conversation

eiriktsarpalis
Copy link
Member

Backport of #76828 to release/7.0

Customer Impact

We received a couple of customer reports that JsonIgnoreAttribute handling when applied to unsupported property types has regressed in .NET 7. Even though there are workarounds for the issue, these are generally unintuitive to users and require code modifications, which might inhibit migration of existing applications to .NET 7.

Testing

Added regression testing for the identified scenarios.

Risk

Low. Makes a minor change in product code so that a lazy loading mechanism already employed in source generated metadata is also applied to reflection derived metadata.

)

* Ensure reflection property metadata is instantiated lazily.

* Address feedback
@ghost
Copy link

ghost commented Oct 11, 2022

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

Issue Details

Backport of #76828 to release/7.0

Customer Impact

We received a couple of customer reports that JsonIgnoreAttribute handling when applied to unsupported property types has regressed in .NET 7. Even though there are workarounds for the issue, these are generally unintuitive to users and require code modifications, which might inhibit migration of existing applications to .NET 7.

Testing

Added regression testing for the identified scenarios.

Risk

Low. Makes a minor change in product code so that a lazy loading mechanism already employed in source generated metadata is also applied to reflection derived metadata.

Author: eiriktsarpalis
Assignees: eiriktsarpalis
Labels:

area-System.Text.Json

Milestone: 7.0.x

@eiriktsarpalis eiriktsarpalis requested review from krwq and layomia and removed request for krwq October 11, 2022 11:24
@eiriktsarpalis eiriktsarpalis added the Servicing-consider Issue for next servicing release review label Oct 11, 2022
@eiriktsarpalis eiriktsarpalis changed the title Ensure reflection property metadata is instantiated lazily (#76828) [release/7.0] Fix regression in JsonIgnoreAttribute handling of unsupported property types Oct 11, 2022
@build-analysis build-analysis bot mentioned this pull request Oct 11, 2022
2 tasks
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 11, 2022
@rbhanda rbhanda modified the milestones: 7.0.x, 7.0.0 Oct 11, 2022
Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this resolved. It was approved by tactics for inclusion in GA.

@jeffhandley jeffhandley merged commit d25158d into dotnet:release/7.0 Oct 11, 2022
@eiriktsarpalis eiriktsarpalis deleted the backport-fix-jsonignore-regression branch October 11, 2022 18:36
@ghost ghost locked as resolved and limited conversation to collaborators Nov 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.

4 participants