-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Support writing base64 JSON segments #111041
Support writing base64 JSON segments #111041
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
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.
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
Outdated
Show resolved
Hide resolved
...ies/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.StringSegment.cs
Outdated
Show resolved
Hide resolved
...ies/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.StringSegment.cs
Show resolved
Hide resolved
...es/System.Text.Json/tests/System.Text.Json.Tests/Utf8JsonWriterTests.Values.StringSegment.cs
Outdated
Show resolved
Hide resolved
...es/System.Text.Json/tests/System.Text.Json.Tests/Utf8JsonWriterTests.Values.StringSegment.cs
Outdated
Show resolved
Hide resolved
} | ||
|
||
/// <summary> | ||
/// The partial UTF-8 code point. | ||
/// </summary> | ||
private ReadOnlySpan<byte> PartialUtf8CodePoint | ||
private ReadOnlySpan<byte> PartialUtf8StringData | ||
{ | ||
get | ||
{ | ||
Debug.Assert(PreviousSegmentEncoding == SegmentEncoding.Utf8); |
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.
I'm guessing PreviousSegmentEncoding
would eventually be replaced by "enclosing container" data as introduced in #111332
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.
That PR doesn't do it but it could in order to avoid the bit twiddling that PreviousSegmentEncoding
currently does.
/ba-g There are known infrastructure errors and test errors. The other build failure was an unrelated timeout affecting other PRs. |
Adds support to the Utf8JsonWriter for writing string value segments of
byte[]
encoded as Base64 UTF-8.Closes #67337