This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Implement escaped-character handling in Utf8JsonReader and JsonElement #36347
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
…ry)GetGuid in Utf8JsonReader and JsonElement This addresses https://github.com/dotnet/corefx/issues/36202.
bartonjs
reviewed
Mar 25, 2019
src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs
Outdated
Show resolved
Hide resolved
bartonjs
suggested changes
Mar 25, 2019
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.
All stackallocs need to be behind size checks.
GrabYourPitchforks
suggested changes
Mar 25, 2019
src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.cs
Outdated
Show resolved
Hide resolved
ahsonkhan
reviewed
Mar 25, 2019
src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.cs
Outdated
Show resolved
Hide resolved
src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Outdated
Show resolved
Hide resolved
src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Outdated
Show resolved
Hide resolved
@layomia if you use certain words eg |
ahsonkhan
reviewed
Mar 26, 2019
src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Outdated
Show resolved
Hide resolved
src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Outdated
Show resolved
Hide resolved
src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Outdated
Show resolved
Hide resolved
src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs
Outdated
Show resolved
Hide resolved
src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs
Outdated
Show resolved
Hide resolved
bartonjs
reviewed
Mar 27, 2019
src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Outdated
Show resolved
Hide resolved
I also added (Try)GetGuid to JsonElement. Coverage for (Try)GetGuid methods is 100% |
ahsonkhan
reviewed
Mar 28, 2019
src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.cs
Outdated
Show resolved
Hide resolved
src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Outdated
Show resolved
Hide resolved
src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Outdated
Show resolved
Hide resolved
bartonjs
reviewed
Apr 1, 2019
bartonjs
approved these changes
Apr 1, 2019
ahsonkhan
approved these changes
Apr 1, 2019
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.
Otherwise, LGTM.
src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs
Outdated
Show resolved
Hide resolved
src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs
Outdated
Show resolved
Hide resolved
src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.cs
Outdated
Show resolved
Hide resolved
src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Outdated
Show resolved
Hide resolved
ahsonkhan
reviewed
Apr 1, 2019
src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Show resolved
Hide resolved
ahsonkhan
approved these changes
Apr 1, 2019
GrabYourPitchforks
approved these changes
Apr 2, 2019
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
dotnet/corefx#36347) * Implement escaped-character handling in (Try)GetDateTime(Offset) & (Try)GetGuid in Utf8JsonReader and JsonElement This addresses https://github.com/dotnet/corefx/issues/36202. * Address review comments * Address more comments * Simplify stackalloc logic * Update fraction digit cap to 15 * Add (Try)GetGuid to JsonElement * Address review feedback * Add FormatException documentation * Address review feedback * Address review comments Commit migrated from dotnet/corefx@769c5ac
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Implement escaped-character handling in (Try)GetDateTime(Offset) & (Try)GetGuid in Utf8JsonReader and JsonElement
Fixes #36202
Fixes #34690
Also, cap the number of fraction digits the Utf8JsonReader can parse to 9.
Addition: This PR also adds (Try)GetGuid to JsonElement