Add BeJsonSerializable round-trip assertions - #3293
Merged
Merged
Conversation
dennisdoomen
had a problem deploying
to
qodana-pr
August 7, 2026 05:59 — with
GitHub Actions
Failure
Test Results 37 files ± 0 37 suites ±0 2m 45s ⏱️ -14s For more details on these failures, see this check. Results for commit d7c33e2. ± Comparison against base commit f4026e7. ♻️ This comment has been updated with latest results. |
Qodana for .NETIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
dennisdoomen
had a problem deploying
to
qodana-pr
August 7, 2026 19:59 — with
GitHub Actions
Failure
dennisdoomen
force-pushed
the
dennisdoomen-add-json-roundtrip-assertion
branch
from
August 7, 2026 20:02
6d5b095 to
ef80ed3
Compare
dennisdoomen
had a problem deploying
to
qodana-pr
August 7, 2026 20:02 — with
GitHub Actions
Failure
dennisdoomen
had a problem deploying
to
qodana-pr
August 8, 2026 16:54 — with
GitHub Actions
Failure
dennisdoomen
force-pushed
the
dennisdoomen-add-json-roundtrip-assertion
branch
from
August 8, 2026 17:02
23bcbf5 to
0d96f00
Compare
dennisdoomen
had a problem deploying
to
qodana-pr
August 8, 2026 17:02 — with
GitHub Actions
Failure
dennisdoomen
force-pushed
the
dennisdoomen-add-json-roundtrip-assertion
branch
from
August 8, 2026 17:02
0d96f00 to
8a3ce20
Compare
dennisdoomen
had a problem deploying
to
qodana-pr
August 8, 2026 17:02 — with
GitHub Actions
Failure
dennisdoomen
force-pushed
the
dennisdoomen-add-json-roundtrip-assertion
branch
from
August 8, 2026 17:08
8a3ce20 to
7a191a1
Compare
dennisdoomen
had a problem deploying
to
qodana-pr
August 8, 2026 17:08 — with
GitHub Actions
Failure
dennisdoomen
force-pushed
the
dennisdoomen-add-json-roundtrip-assertion
branch
from
August 8, 2026 17:19
7a191a1 to
b4dd21a
Compare
dennisdoomen
had a problem deploying
to
qodana-pr
August 8, 2026 17:19 — with
GitHub Actions
Failure
dennisdoomen
force-pushed
the
dennisdoomen-add-json-roundtrip-assertion
branch
from
August 8, 2026 17:28
b4dd21a to
5295137
Compare
dennisdoomen
had a problem deploying
to
qodana-pr
August 8, 2026 17:28 — with
GitHub Actions
Failure
dennisdoomen
force-pushed
the
dennisdoomen-add-json-roundtrip-assertion
branch
from
August 8, 2026 20:12
5295137 to
90d3f0e
Compare
dennisdoomen
had a problem deploying
to
qodana-pr
August 8, 2026 20:12 — with
GitHub Actions
Failure
dennisdoomen
force-pushed
the
dennisdoomen-add-json-roundtrip-assertion
branch
from
August 8, 2026 20:15
90d3f0e to
c935db7
Compare
dennisdoomen
had a problem deploying
to
qodana-pr
August 8, 2026 20:15 — with
GitHub Actions
Failure
dennisdoomen
force-pushed
the
dennisdoomen-add-json-roundtrip-assertion
branch
from
August 8, 2026 20:15
c935db7 to
9029670
Compare
dennisdoomen
had a problem deploying
to
qodana-pr
August 8, 2026 20:15 — with
GitHub Actions
Failure
dennisdoomen
marked this pull request as ready for review
August 8, 2026 20:17
jnyrup
requested changes
Aug 8, 2026
dennisdoomen
force-pushed
the
dennisdoomen-add-json-roundtrip-assertion
branch
from
August 9, 2026 05:48
9029670 to
2f797d5
Compare
This was referenced Oct 2, 2026
Open
This branch was previously deployed
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.
Adds first-class round-trip assertions for
System.Text.Json, which is the serializer many users rely on today and which was missing alongside the existing XML and data contract helpers.The implementation adds
BeJsonSerializable()/BeJsonSerializable<T>()overloads, supports custom equivalency configuration, and acceptsJsonSerializerOptionsso callers can use custom converters and other serializer settings. The comparison followsSystem.Text.Jsonsemantics by checking properties by default and excluding[JsonIgnore]members from the round-trip equivalency check.The JSON assertion is only compiled on
NET6_0_OR_GREATER, matching the existing JSON equivalency API surface.The specs cover successful round-tripping, serializer failures, ignored members, custom converter scenarios, and null option guards. The unreleased notes and serialization docs were updated to document the new assertion and ignored-member behavior.
Closes #3264
IMPORTANT
./build.sh --target spellcheckor.\build.ps1 --target spellcheckbefore pushing and check the good outcomeCONTRIBUTOR LICENSE GRANT
By submitting this contribution, the contributor hereby irrevocably grants to the project owners and maintainers a perpetual, worldwide, royalty-free, irrevocable license to use, reproduce, modify, distribute, sublicense, and create derivative works of the contribution for any purpose and under any terms, including proprietary licensing.
The contributor waives any moral rights in the contribution to the extent permitted by law and agrees not to assert any claim of authorship or control over the contribution. The contributor represents that they are the sole author of the contribution and that it is provided free of any third-party claims.
The contributor understands and agrees that the maintainers may, at their sole discretion, use, license, or redistribute the contribution as part of any work and under any terms they choose, without further permission or attribution.