Skip to content

[release/11.0] Honor JsonNumberHandlingAttribute declarations on C# unions - #133951

Merged
artl93 merged 13 commits into
release/11.0from
backport/pr-133673-to-release/11.0
Sep 15, 2026
Merged

artl93 merged 13 commits into
release/11.0from
backport/pr-133673-to-release/11.0

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Backport of #133673 to release/11.0

/cc @eiriktsarpalis @copilot

Customer Impact

  • Customer reported
  • Found internally

Fixes a customer reported functionality gap between two newly introduced features in .NET 11: union support and JsonNumberHandlingAttribute.

Regression

  • Yes
  • No

Testing

Added tests covering the impacted scenaria.

Risk

Low. Makes straightforward additions to product code addressing the missing functionality.

Copilot AI and others added 13 commits September 15, 2026 14:20
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
This reverts commit 368c090.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply union number handling to structural classification, source-generator ambiguity diagnostics, and schema export. Cover Web defaults, metadata precedence, nullable cases, and context isolation in the corresponding test suites.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Set the read/write frame handling from the union override or the selected case metadata. Cover numeric and nullable cases, collection continuations, precedence, and POCO member independence.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Carry the originating JsonTypeInfo in an internal context property so structural classification honors directly supplied contract overrides without resolving another contract through options.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@eiriktsarpalis eiriktsarpalis added the Servicing-consider Issue for next servicing release review label Sep 15, 2026
@eiriktsarpalis eiriktsarpalis added this to the 11.0.0 milestone Sep 15, 2026
@eiriktsarpalis

Copy link
Copy Markdown
Member

/ba-g test failures are unrelated

@artl93 artl93 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

New for .NET 11, customer reported. Approved.

@artl93 artl93 added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 15, 2026
@artl93
artl93 merged commit f239d17 into release/11.0 Sep 15, 2026
99 of 104 checks passed
@artl93
artl93 deleted the backport/pr-133673-to-release/11.0 branch September 15, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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