Skip to content

Conversation

@ahsonkhan
Copy link
Contributor

Fixes #2898

Also, other fixes around consistency and correctness.

cc @mairaw, @GrabYourPitchforks, @carlossanlop

@carlossanlop carlossanlop added 🏁 Release: .NET Core 3.0 :checkered_flag: Release: .NET Core 3.0 new-content Indicates PRs that contain new articles waiting-on-reviews Indicates PRs that cannot be merged because of the lack of reviews labels Sep 9, 2019
@carlossanlop carlossanlop added this to the September 2019 milestone Sep 9, 2019
Copy link
Contributor

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

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

Left a few comments, @ahsonkhan. Let's also wait for @rpetrusha / @mairaw to comment.

Copy link

@rpetrusha rpetrusha left a comment

Choose a reason for hiding this comment

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

Thanks for these updates and corrections, @ahsonkhan. I've left some comments for you to consider, along with a few suggestions.

@ahsonkhan
Copy link
Contributor Author

I have addressed all the feedback that I thought was actionable and made judgement calls for some others. Please take a look. Tyvm for the review :)

Copy link
Contributor

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

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

Left two suggestions (see cref => xref, in remarks). Other than that, it looks good.
After you merge the suggestions, let's wait for the build to finish and @mairaw / @rpetrusha 's approval so we can commit.

@ahsonkhan
Copy link
Contributor Author

Anything left to do or is this good to merge?

Copy link
Contributor

@mairaw mairaw left a comment

Choose a reason for hiding this comment

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

A few extra comments

Therefore, if the input is untrusted or not previously validated, call <xref:System.Text.Json.Utf8JsonReader.GetString> to get the JSON string token.
## Remarks
Since this property returns the raw bytes, avoid using it for text comparison. Instead call <xref:System.Text.Json.Utf8JsonReader.ValueTextEquals%2A> which will unescape the text if necessary.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Since this property returns the raw bytes, avoid using it for text comparison. Instead call <xref:System.Text.Json.Utf8JsonReader.ValueTextEquals%2A> which will unescape the text if necessary.
Since this property returns the raw bytes, avoid using it for text comparison. Instead call <xref:System.Text.Json.Utf8JsonReader.ValueTextEquals%2A>, which unescapes the text if necessary.

Copy link

@rpetrusha rpetrusha left a comment

Choose a reason for hiding this comment

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

Committed Maira's suggestions.

@rpetrusha rpetrusha merged commit 15d567d into dotnet:master Sep 10, 2019
@ahsonkhan
Copy link
Contributor Author

Changes look good.

@ahsonkhan ahsonkhan deleted the UpdateUtf8JsonReaderDocs branch September 10, 2019 04:26
@mairaw mairaw removed the waiting-on-reviews Indicates PRs that cannot be merged because of the lack of reviews label Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏁 Release: .NET Core 3.0 :checkered_flag: Release: .NET Core 3.0 new-content Indicates PRs that contain new articles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Utf8JsonReader docs should mention that some properties are non-validating

5 participants