Skip to content
Merged
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
Next Next commit
Update doc for JsonValue.GetValue
  • Loading branch information
steveharter committed Jul 30, 2021
commit c3b36e4983685ce54f70a5d647dffba2a0025144
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

namespace System.Text.Json.Nodes
{
Expand Down Expand Up @@ -165,6 +164,15 @@ public JsonNode Root
/// <summary>
/// Gets the value for the current <see cref="JsonValue"/>.
/// </summary>
/// <remarks>
/// {TValue} can be the type or base type of the underlying value.
/// If the underlying value is a <see cref="JsonElement"/> then {TValue} can also be the type of any primitive
/// value supported by current <see cref="JsonElement"/>.<br />
/// Specifying <see cref="object"/> will always succeed and return the underlying value as <see cref="object"/>.<br />
/// The underlying value of a <see cref="JsonValue"/> after deserialization is <see cref="JsonElement"/>,
/// otherwise it is the value specified when the <see cref="JsonValue"/> was created.
/// </remarks>
/// <seealso cref="JsonValue.TryGetValue{T}">
/// <exception cref="FormatException">
/// The current <see cref="JsonNode"/> cannot be represented as a {TValue}.
/// </exception>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ internal override void GetPath(List<string> path, JsonNode? child)
/// <summary>
/// Tries to obtain the current JSON value and returns a value that indicates whether the operation succeeded.
/// </summary>
/// <remarks>
/// {T} can be the type or base type of the underlying value.
/// If the underlying value is a <see cref="JsonElement"/> then {T} can also be the type of any primitive
/// value supported by current <see cref="JsonElement"/>.<br />
/// Specifying <see cref="object"/> will always succeed and return the underlying value as <see cref="object"/>.<br />
/// The underlying value of a <see cref="JsonValue"/> after deserialization is <see cref="JsonElement"/>,
/// otherwise it is the value specified when the <see cref="JsonValue"/> was created.
/// </remarks>
/// <seealso cref="JsonNode.GetValue{TValue}"></seealso>
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this also need renaming?

Suggested change
/// <seealso cref="JsonNode.GetValue{TValue}"></seealso>
/// <seealso cref="JsonNode.GetValue{T}"></seealso>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. Thanks

/// <typeparam name="T">The type of value to obtain.</typeparam>
/// <param name="value">When this method returns, contains the parsed value.</param>
/// <returns><see langword="true"/> if the value can be successfully obtained; otherwise, <see langword="false"/>.</returns>
Expand Down