-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
JSON continuation tests #42393
JSON continuation tests #42393
Conversation
- Test continuation at every position inside the tested object - Many member with primitive and nullable types - One more level of nested object - All combinations of class/struct for tested and nested object - tested and nested object with parametrized ctor for some properties
Tweak the payload and expect `JsonException`
@layomia This is not yet ready for review. I hope to get done what I have in mind tomorrow. |
Is there anything else about continuation / chunked buffer? |
Since you asked, how about continuation where the token being split isn't In the runtime/src/libraries/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs Lines 474 to 643 in e0e1919
|
All tests here split the payload once on every single character. Thus all tokens are tested how they work when split into 2 chunks including all mentioned examples except whitespaces. I will add them by enabling WriteIndented |
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.NullToken.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.NullToken.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.NullToken.cs
Show resolved
Hide resolved
Added dictionary test
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.NullToken.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.NullToken.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.cs
Outdated
Show resolved
Hide resolved
I'd say that's it. Thanks for your suggestions, help and reviews. Really appreciated. Feel free to change whatever you want - or wait 2 weeks. See you - peace |
src/libraries/System.Text.Json/tests/Serialization/ContinuationTests.NullToken.cs
Outdated
Show resolved
Hide resolved
@devsko, thanks for your efforts here. Are you still working on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - @devsko we can merge this once conflicts and #42393 (comment) are resolved.
I pushed a commit to finish this PR. |
See #42158
comment and comment and comment
Test only
Test several scenarios in
System.Text.Json
where deserialization has to continue after the next chunk of data is available.