-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Update Utf8JsonReader ValueSpan, Sequence, and ValueTextEquals docs. #3142
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
Conversation
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.
Left a few comments, @ahsonkhan. Let's also wait for @rpetrusha / @mairaw to comment.
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.
Thanks for these updates and corrections, @ahsonkhan. I've left some comments for you to consider, along with a few suggestions.
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 :) |
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.
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.
Anything left to do or is this good to merge? |
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.
A few extra comments
|
||
## 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. |
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.
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. |
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.
Committed Maira's suggestions.
Changes look good. |
Fixes #2898
Also, other fixes around consistency and correctness.
cc @mairaw, @GrabYourPitchforks, @carlossanlop