Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Implement escaped-character handling in Utf8JsonReader and JsonElement #36347

Merged
merged 10 commits into from
Apr 2, 2019
Merged

Implement escaped-character handling in Utf8JsonReader and JsonElement #36347

merged 10 commits into from
Apr 2, 2019

Conversation

layomia
Copy link
Contributor

@layomia layomia commented Mar 25, 2019

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

Copy link
Member

@bartonjs bartonjs left a 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.

@danmoseley
Copy link
Member

This addresses #36202.

@layomia if you use certain words eg fixes #36202 in your description it will auto close the issue on merge: https://help.github.com/en/articles/closing-issues-using-keywords

@layomia layomia requested a review from bartonjs March 27, 2019 17:38
@layomia
Copy link
Contributor Author

layomia commented Mar 28, 2019

I also added (Try)GetGuid to JsonElement.

Coverage for (Try)GetGuid methods is 100%
report.zip

Copy link

@ahsonkhan ahsonkhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, LGTM.

@karelz karelz changed the title Implement escaped-character handling in (Try)GetDateTime(Offset) & (T… Implement escaped-character handling in Ut8JsonReader and JsonElement Apr 1, 2019
@layomia layomia changed the title Implement escaped-character handling in Ut8JsonReader and JsonElement Implement escaped-character handling in Utf8JsonReader and JsonElement Apr 1, 2019
@karelz karelz added this to the 3.0 milestone Apr 1, 2019
@layomia layomia merged commit 769c5ac into dotnet:master Apr 2, 2019
@layomia layomia deleted the escape branch April 5, 2019 00:41
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants