Skip to content

Commit a7c6974

Browse files
Add missing docs to System.Text.Json (dotnet#59053)
1 parent 03d9202 commit a7c6974

15 files changed

Lines changed: 134 additions & 33 deletions

src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonNode.Operators.cs

Lines changed: 99 additions & 33 deletions
Large diffs are not rendered by default.

src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonNode.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ public JsonNode Root
164164
/// <summary>
165165
/// Gets the value for the current <see cref="JsonValue"/>.
166166
/// </summary>
167+
/// <typeparam name="T">The type of the value to obtain from the <see cref="JsonValue"/>.</typeparam>
168+
/// <returns>A value converted from the <see cref="JsonValue"/> instance.</returns>
167169
/// <remarks>
168170
/// {T} can be the type or base type of the underlying value.
169171
/// If the underlying value is a <see cref="JsonElement"/> then {T} can also be the type of any primitive

src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Document.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public static partial class JsonSerializer
1212
/// <summary>
1313
/// Converts the <see cref="JsonDocument"/> representing a single JSON value into a <typeparamref name="TValue"/>.
1414
/// </summary>
15+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
1516
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
1617
/// <param name="document">The <see cref="JsonDocument"/> to convert.</param>
1718
/// <param name="options">Options to control the behavior during parsing.</param>
@@ -74,6 +75,7 @@ public static partial class JsonSerializer
7475
/// <summary>
7576
/// Converts the <see cref="JsonDocument"/> representing a single JSON value into a <typeparamref name="TValue"/>.
7677
/// </summary>
78+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
7779
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
7880
/// <param name="document">The <see cref="JsonDocument"/> to convert.</param>
7981
/// <param name="jsonTypeInfo">Metadata about the type to convert.</param>

src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Element.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public static partial class JsonSerializer
1212
/// <summary>
1313
/// Converts the <see cref="JsonElement"/> representing a single JSON value into a <typeparamref name="TValue"/>.
1414
/// </summary>
15+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
1516
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
1617
/// <param name="element">The <see cref="JsonElement"/> to convert.</param>
1718
/// <param name="options">Options to control the behavior during parsing.</param>
@@ -61,6 +62,7 @@ public static partial class JsonSerializer
6162
/// <summary>
6263
/// Converts the <see cref="JsonElement"/> representing a single JSON value into a <typeparamref name="TValue"/>.
6364
/// </summary>
65+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
6466
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
6567
/// <param name="element">The <see cref="JsonElement"/> to convert.</param>
6668
/// <param name="jsonTypeInfo">Metadata about the type to convert.</param>

src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Node.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public static partial class JsonSerializer
1414
/// <summary>
1515
/// Converts the <see cref="JsonNode"/> representing a single JSON value into a <typeparamref name="TValue"/>.
1616
/// </summary>
17+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
1718
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
1819
/// <param name="node">The <see cref="JsonNode"/> to convert.</param>
1920
/// <param name="options">Options to control the behavior during parsing.</param>
@@ -60,6 +61,7 @@ public static partial class JsonSerializer
6061
/// <summary>
6162
/// Converts the <see cref="JsonNode"/> representing a single JSON value into a <typeparamref name="TValue"/>.
6263
/// </summary>
64+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
6365
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
6466
/// <param name="node">The <see cref="JsonNode"/> to convert.</param>
6567
/// <param name="jsonTypeInfo">Metadata about the type to convert.</param>

src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public static partial class JsonSerializer
1212
/// <summary>
1313
/// Parses the UTF-8 encoded text representing a single JSON value into a <typeparamref name="TValue"/>.
1414
/// </summary>
15+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
1516
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
1617
/// <param name="utf8Json">JSON text to parse.</param>
1718
/// <param name="options">Options to control the behavior during parsing.</param>
@@ -65,6 +66,7 @@ public static partial class JsonSerializer
6566
/// <summary>
6667
/// Parses the UTF-8 encoded text representing a single JSON value into a <typeparamref name="TValue"/>.
6768
/// </summary>
69+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
6870
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
6971
/// <param name="utf8Json">JSON text to parse.</param>
7072
/// <param name="jsonTypeInfo">Metadata about the type to convert.</param>

src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public static partial class JsonSerializer
2121
/// Reads the UTF-8 encoded text representing a single JSON value into a <typeparamref name="TValue"/>.
2222
/// The Stream will be read to completion.
2323
/// </summary>
24+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
2425
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
2526
/// <param name="utf8Json">JSON data to parse.</param>
2627
/// <param name="options">Options to control the behavior during reading.</param>
@@ -58,6 +59,7 @@ public static partial class JsonSerializer
5859
/// Reads the UTF-8 encoded text representing a single JSON value into a <typeparamref name="TValue"/>.
5960
/// The Stream will be read to completion.
6061
/// </summary>
62+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
6163
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
6264
/// <param name="utf8Json">JSON data to parse.</param>
6365
/// <param name="options">Options to control the behavior during reading.</param>
@@ -173,6 +175,7 @@ public static partial class JsonSerializer
173175
/// Reads the UTF-8 encoded text representing a single JSON value into a <typeparamref name="TValue"/>.
174176
/// The Stream will be read to completion.
175177
/// </summary>
178+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
176179
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
177180
/// <param name="utf8Json">JSON data to parse.</param>
178181
/// <param name="jsonTypeInfo">Metadata about the type to convert.</param>
@@ -213,6 +216,7 @@ public static partial class JsonSerializer
213216
/// Reads the UTF-8 encoded text representing a single JSON value into a <typeparamref name="TValue"/>.
214217
/// The Stream will be read to completion.
215218
/// </summary>
219+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
216220
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
217221
/// <param name="utf8Json">JSON data to parse.</param>
218222
/// <param name="jsonTypeInfo">Metadata about the type to convert.</param>
@@ -347,6 +351,7 @@ public static partial class JsonSerializer
347351
/// Wraps the UTF-8 encoded text into an <see cref="IAsyncEnumerable{TValue}" />
348352
/// that can be used to deserialize root-level JSON arrays in a streaming manner.
349353
/// </summary>
354+
/// <typeparam name="TValue">The element type to deserialize asynchronously.</typeparam>
350355
/// <returns>An <see cref="IAsyncEnumerable{TValue}" /> representation of the provided JSON array.</returns>
351356
/// <param name="utf8Json">JSON data to parse.</param>
352357
/// <param name="options">Options to control the behavior during reading.</param>

src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public static partial class JsonSerializer
1717
/// <summary>
1818
/// Parses the text representing a single JSON value into a <typeparamref name="TValue"/>.
1919
/// </summary>
20+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
2021
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
2122
/// <param name="json">JSON text to parse.</param>
2223
/// <param name="options">Options to control the behavior during parsing.</param>
@@ -55,6 +56,7 @@ public static partial class JsonSerializer
5556
/// <summary>
5657
/// Parses the text representing a single JSON value into an instance of the type specified by a generic type parameter.
5758
/// </summary>
59+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
5860
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
5961
/// <param name="json">The JSON text to parse.</param>
6062
/// <param name="options">Options to control the behavior during parsing.</param>
@@ -177,6 +179,7 @@ public static partial class JsonSerializer
177179
/// <summary>
178180
/// Parses the text representing a single JSON value into a <typeparamref name="TValue"/>.
179181
/// </summary>
182+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
180183
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
181184
/// <param name="json">JSON text to parse.</param>
182185
/// <param name="jsonTypeInfo">Metadata about the type to convert.</param>
@@ -224,6 +227,7 @@ public static partial class JsonSerializer
224227
/// <summary>
225228
/// Parses the text representing a single JSON value into a <typeparamref name="TValue"/>.
226229
/// </summary>
230+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
227231
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
228232
/// <param name="json">JSON text to parse.</param>
229233
/// <param name="jsonTypeInfo">Metadata about the type to convert.</param>

src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Utf8JsonReader.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public static partial class JsonSerializer
1414
/// <summary>
1515
/// Reads one JSON value (including objects or arrays) from the provided reader into a <typeparamref name="TValue"/>.
1616
/// </summary>
17+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
1718
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
1819
/// <param name="reader">The reader to read.</param>
1920
/// <param name="options">Options to control the serializer behavior during reading.</param>
@@ -120,6 +121,7 @@ public static partial class JsonSerializer
120121
/// <summary>
121122
/// Reads one JSON value (including objects or arrays) from the provided reader into a <typeparamref name="TValue"/>.
122123
/// </summary>
124+
/// <typeparam name="TValue">The type to deserialize the JSON value into.</typeparam>
123125
/// <returns>A <typeparamref name="TValue"/> representation of the JSON value.</returns>
124126
/// <param name="reader">The reader to read.</param>
125127
/// <param name="jsonTypeInfo">Metadata about the type to convert.</param>

src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Document.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public static partial class JsonSerializer
1313
/// <summary>
1414
/// Converts the provided value into a <see cref="JsonDocument"/>.
1515
/// </summary>
16+
/// <typeparam name="TValue">The type of the value to serialize.</typeparam>
1617
/// <returns>A <see cref="JsonDocument"/> representation of the JSON value.</returns>
1718
/// <param name="value">The value to convert.</param>
1819
/// <param name="options">Options to control the conversion behavior.</param>
@@ -56,6 +57,7 @@ public static JsonDocument SerializeToDocument(object? value, Type inputType, Js
5657
/// <summary>
5758
/// Converts the provided value into a <see cref="JsonDocument"/>.
5859
/// </summary>
60+
/// <typeparam name="TValue">The type of the value to serialize.</typeparam>
5961
/// <returns>A <see cref="JsonDocument"/> representation of the value.</returns>
6062
/// <param name="value">The value to convert.</param>
6163
/// <param name="jsonTypeInfo">Metadata about the type to convert.</param>

0 commit comments

Comments
 (0)