Repository navigation
Obsolete JsonPatch STJ OperationBase.ShouldSerializeFrom - #67984
Merged
Youssef1313 merged 5 commits intoJul 27, 2026
Merged
Conversation
Co-authored-by: Youssef1313 <[email protected]>
Co-authored-by: Youssef1313 <[email protected]>
Copilot
AI
changed the title
[WIP] Remove obsolete OperationBase.ShouldSerializeFrom method
Obsolete JsonPatch STJ OperationBase.ShouldSerializeFrom
Jul 23, 2026
Youssef1313
marked this pull request as ready for review
July 24, 2026 06:14
Contributor
There was a problem hiding this comment.
Pull request overview
Deprecates the STJ-only OperationBase.ShouldSerializeFrom() API in JsonPatch.SystemTextJson (a Newtonsoft-style conditional serialization artifact) while preserving runtime behavior, and adds a unit test to lock in the intended deprecation guidance.
Changes:
- Marked
OperationBase.ShouldSerializeFrom()as[Obsolete]with migration guidance (OperationType is Move or Copy). - Added a unit test verifying the method is annotated with
ObsoleteAttributeand that the message matches exactly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Features/JsonPatch.SystemTextJson/src/Operations/OperationBase.cs | Adds [Obsolete] to ShouldSerializeFrom() (with migration guidance); minor cleanup needed for now-outdated comment. |
| src/Features/JsonPatch.SystemTextJson/test/OperationBaseTests.cs | Adds a focused test that asserts the ObsoleteAttribute presence and message content. |
Youssef1313
approved these changes
Jul 24, 2026
ilonatommy
approved these changes
Jul 27, 2026
Youssef1313
deleted the
copilot/obsolete-operations-method-shouldserializefrom
branch
July 27, 2026 12:48
Member
|
/backport to release/11.0-preview7 |
Contributor
|
Started backporting to |
11 tasks
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.
Fixes #67966
This method appears to have been unintentionally copied from the older Newtonsoft.Json implementation.