Repository navigation
Allow non-metadata JSON property names with a leading dollar sign - #135776
Merged
eiriktsarpalis merged 1 commit intoOct 21, 2026
Merged
eiriktsarpalis merged 1 commit into
eiriktsarpalis merged 1 commit into
Conversation
Use exact metadata-name matching instead of rejecting all dollar-prefixed properties. Update regression coverage and reference-handling documentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6a4bf4d8-af7e-42b6-bb96-64c74b24e259
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-text-json |
Contributor
|
🎉 |
This was referenced Oct 14, 2026
Closed
tannergooding
approved these changes
Oct 21, 2026
eiriktsarpalis
deleted the
eiriktsarpalis-json-metadata-property-names
branch
October 21, 2026 19:38
Contributor
|
@eiriktsarpalis was the subscribers list cleared? I didn't get a notification for this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
System.Text.Json rejects all property names starting with
$when reference preservation or polymorphic deserialization is enabled, even when those names do not conflict with metadata.Use the existing exact-name metadata classifier instead. Recognized metadata properties retain their validation, while unrelated
$-prefixed names are processed as ordinary properties. When a custom type discriminator name is configured,$typeis an ordinary property rather than metadata.Updated the reference-handling documentation and regression coverage for mapped properties, dictionary keys, extension data, parameterized constructors, escaped names, case-sensitive matching, and out-of-order metadata. Debug and Release builds succeeded. All five serializer and source-generation test projects passed for both .NET and .NET Framework, with no failures.
Resolves #79482
Note
This pull request was created with GitHub Copilot.