-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Test JSON serialization of EF object graphs #20827
Merged
Merged
Conversation
This file contains 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
/cc @jeffhandley @jozkee |
jozkee
reviewed
May 5, 2020
test/EFCore.Specification.Tests/Query/NorthwindIncludeQueryTestBase.cs
Outdated
Show resolved
Hide resolved
jozkee
reviewed
May 5, 2020
test/EFCore.Specification.Tests/Query/NorthwindIncludeQueryTestBase.cs
Outdated
Show resolved
Hide resolved
ajcvickers
force-pushed
the
SerializeAllTheThings0428
branch
2 times, most recently
from
May 6, 2020 21:51
2a989e4
to
01f2dc2
Compare
ajcvickers
force-pushed
the
SerializeAllTheThings0428
branch
3 times, most recently
from
May 23, 2020 21:43
b6e8f22
to
0ec1f59
Compare
@dotnet/efcore Can I get a review of this now. (I ended up having to remove one of the tests because the Mac C.I. agents continually ran out of memory trying to serialize the graph.) |
test/EFCore.Specification.Tests/Query/NorthwindIncludeQueryTestBase.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Specification.Tests/Query/NorthwindIncludeQueryTestBase.cs
Outdated
Show resolved
Hide resolved
AndriySvyryd
approved these changes
May 27, 2020
Fixes #20548 Added tests that serialize graphs with both the BCL Json support and Newtonsoft.Json. Findings: * BCL Json * Preserving references working fine; needed to increase max-depth for heavily nested graph, but exception message was clear * Lack of an Ignore option may be missed because output is harder to understand when it contains many internal references. Will follow up on this. * Newtonsoft.JSON * Found it easy to get out-of-memory errors even when ignoring cycles * Got stack overflow errors when attempting to serialize cycles instead of ignoring them * I'm probably not configuring things correctly here, but this isn't high priority * Net Topology Suite types are not JSON-serialization-friendly; will follow up on this
ajcvickers
force-pushed
the
SerializeAllTheThings0428
branch
from
May 31, 2020 20:24
0ec1f59
to
5b0f068
Compare
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 #20548
Added tests that serialize graphs with both the BCL Json support and Newtonsoft.Json.
Findings:
Got stack overflow errors when attempting to serialize cycles instead of ignoring themI'm probably not configuring things correctly here, but this isn't high priority