-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix remarks for JsonElement TryGetDouble and TryGetSingle #3719
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
Add missing `"` and change `it returns false` to `it returns <see langword="true">`
Btw, what do I need to do to get write/merge privileges in this repo? cc @carlossanlop |
xml/System.Text.Json/JsonElement.xml
Outdated
@@ -1515,7 +1515,7 @@ This method does not parse the contents of a JSON string value. | |||
|
|||
This method does not parse the contents of a JSON string value. | |||
|
|||
On .NET Core, this method does not return `false` for values larger than <xref:System.Single.MaxValue?displayProperty=nameWithType> or smaller than <xref:System.Single.MinValue?displayProperty=nameWithType>). Instead, it returns `false` and assigns <xref:System.Single.PositiveInfinity?displayProperty=nameWithType> or <xref:System.Single.NegativeInfinity?displayProperty=nameWithType> to the `value` argument. | |||
On .NET Core, this method does not return `false` for values larger than <xref:System.Single.MaxValue?displayProperty=nameWithType> or smaller than <xref:System.Single.MinValue?displayProperty=nameWithType>). Instead, it returns <see langword="true"> and assigns <xref:System.Single.PositiveInfinity?displayProperty=nameWithType> or <xref:System.Single.NegativeInfinity?displayProperty=nameWithType> to the `value` argument. |
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.
@carlossanlop - any ideas what caused the typo? Was these hand-written or does it point to a potential porting tool bug?
These were added in #2471.
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.
It wasn't rendering properly. You can check the preview here.
Co-Authored-By: Genevieve Warren <gewarren@microsoft.com>
Co-Authored-By: Genevieve Warren <gewarren@microsoft.com>
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.
The 'true' still wasn't rendering. It seems those <see langword="" />
tags aren't supported in the Remarks section.
Co-Authored-By: Genevieve Warren <gewarren@microsoft.com>
Hmm, well that's unfortunate. Do you know why the |
I don't know why the Remarks section is different. @mairaw? |
Add missing
"
and changeit returns false
toit returns <see langword="true">
Fixes:

https://docs.microsoft.com/en-us/dotnet/api/system.text.json.jsonelement.trygetdouble?view=netcore-3.1
And:

https://docs.microsoft.com/en-us/dotnet/api/system.text.json.jsonelement.trygetsingle?view=netcore-3.1#remarks
cc @mairaw