Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
Suggestions by rpetrusha

Co-Authored-By: carlossanlop <[email protected]>
  • Loading branch information
carlossanlop authored May 7, 2019
commit 1068a9b75d9efed274944436850488a41084348d
1 change: 1 addition & 0 deletions xml/System.Text.Json/JsonDocument.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
<returns>A JsonDocument representation of the JSON value.</returns>
<remarks>The <see cref="T:System.Buffers.ReadOnlySequence`1" /> may be used for the entire lifetime of the JsonDocument object, and the caller must ensure that the data therein does not change during the object's lifetime.


Because the input is considered to be text, a UTF-8 Byte-Order-Mark (BOM) must not be present.</remarks>
<exception cref="T:System.Text.Json.JsonReaderException"><paramref name="utf8Json" /> does not represent a valid single JSON value.</exception>
<exception cref="T:System.ArgumentException"><paramref name="readerOptions" /> contains unsupported options.</exception>
Expand Down
24 changes: 15 additions & 9 deletions xml/System.Text.Json/JsonElement.xml
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,10 @@ If a property is defined multiple times for the same object, the last such defin
<Docs>
<summary>Gets the current JSON number as a <see cref="T:System.Single" />.</summary>
<returns>The current JSON number as a <see cref="T:System.Single" />.</returns>
<remarks>This method does not parse the contents of a JSON string value.
On .NET Core this method returns <see cref="F:System.Single.PositiveInfinity" /> (or <see cref="F:System.Single.NegativeInfinity" />) for values larger than <see cref="F:System.Single.MaxValue" /> (or smaller than <see cref="F:System.Single.MinValue" />).</remarks>
<remarks><format type="text/markdown"><![CDATA[
This method does not parse the contents of a JSON string value.
On .NET Core this method returns <xref:System.Single.PositiveInfinity?displayProperty=nameWithType> (or <xref:System.Single.NegativeInfinity?displayProperty=nameWithType>) for values larger than <xref:System.Single.MaxValue?displayProperty=nameWithType> (or smaller than <xref:System.Single.MinValue?displayProperty=nameWithType>).
]]></format></remarks>
<exception cref="T:System.InvalidOperationException">This value's <see cref="P:System.Text.Json.JsonElement.Type" /> is not <see cref="F:System.Text.Json.JsonValueType.Number" />.</exception>
<exception cref="T:System.FormatException">The value cannot be represented as a <see cref="T:System.Single" />.</exception>
<exception cref="T:System.ObjectDisposedException">The parent <see cref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
Expand Down Expand Up @@ -497,11 +499,13 @@ On .NET Core this method returns <see cref="F:System.Single.PositiveInfinity" />
<Docs>
<summary>Gets a string representation for the current value appropriate to the value type.</summary>
<returns>A string representation for the current value appropriate to the value type.</returns>
<remarks>For <see cref="F:System.Text.Json.JsonValueType.Null" />, <see cref="F:System.String.Empty" /> is returned.
For <see cref="F:System.Text.Json.JsonValueType.True" />, <see cref="F:System.Boolean.TrueString" /> is returned.
For <see cref="F:System.Text.Json.JsonValueType.False" />, <see cref="F:System.Boolean.FalseString" /> is returned.
For <see cref="F:System.Text.Json.JsonValueType.String" />, the value of <see cref="M:System.Text.Json.JsonElement.GetString" />() is returned.
For other types, the value of <see cref="M:System.Text.Json.JsonElement.GetRawText" />() is returned.</remarks>
<remarks><format type="text/markdown"><![CDATA[
For <xref:System.Text.Json.JsonValueType.Null?displayProperty=nameWithType>, <xref:System.String.Empty?displayProperty=nameWithType> is returned.
For <xref:System.Text.Json.JsonValueType.True?displayProperty=nameWithType>, <xref:System.Boolean.TrueString?displayProperty=nameWithType> is returned.
For <xref:System.Text.Json.JsonValueType.False?displayProperty=nameWithType>, <xref:System.Boolean.FalseString?displayProperty=nameWithType> is returned.
For <xref:System.Text.Json.JsonValueType.String?displayProperty=nameWithType>, the value of <xref:System.Text.Json.JsonElement.GetString?displayProperty=nameWithType> is returned.
For other types, the value of <xref:System.Text.Json.JsonElement.GetRawText?displayProperty=nameWithType> is returned.
]]></format></remarks>
<exception cref="T:System.ObjectDisposedException"> The parent <see cref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
</Docs>
</Member>
Expand Down Expand Up @@ -733,8 +737,10 @@ If a property is defined multiple times for the same object, the last such defin
<param name="value">When the method returns, the JSON number represented as a single-precision floating point number.</param>
<summary>Attempts to represent the current JSON number as a <see cref="T:System.Single" />.</summary>
<returns><see langword="true" /> if the number can be represented as a <see cref="T:System.Single" />, <see langword="false" /> otherwise.</returns>
<remarks>This method does not parse the contents of a JSON string value.
On .NET Core this method does not return <see langword="false" /> for values larger than <see cref="F:System.Single.MaxValue" /> (or smaller than <see cref="F:System.Single.MinValue" />), instead <see langword="true" /> is returned and <see cref="F:System.Single.PositiveInfinity" /> (or <see cref="F:System.Single.NegativeInfinity" />) is emitted.</remarks>
<remarks><format type="text/markdown"><![CDATA[
This method does not parse the contents of a JSON string value.
On .NET Core this method does not return <xref:false> for values larger than <xref:System.Single.MaxValue?displayProperty=nameWithType> (or smaller than <xref:System.Single.MinValue?displayProperty=nameWithType>), instead <xref:true> is returned and <xref:System.Single.PositiveInfinity?displayProperty=nameWithType> (or <xref:System.Single.NegativeInfinity?displayProperty=nameWithType>) is emitted.
]]></format></remarks>
<exception cref="T:System.InvalidOperationException">This value's <see cref="P:System.Text.Json.JsonElement.Type" /> is not <see cref="F:System.Text.Json.JsonValueType.Number" />.</exception>
<exception cref="T:System.ObjectDisposedException"> The parent <see cref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
</Docs>
Expand Down