You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Text.Json/JsonReaderOptions.xml
+7-19Lines changed: 7 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -56,11 +56,11 @@ For more information, see [How to write custom serializers and deserializers wit
56
56
<ReturnType>System.Boolean</ReturnType>
57
57
</ReturnValue>
58
58
<Docs>
59
-
<summary>
60
-
<para>Defines whether the <seecref="T:System.Text.Json.Utf8JsonReader" /> should tolerate zero or more top-level JSON values that are whitespace separated.</para>
61
-
</summary>
62
-
<value>To be added.</value>
63
-
<remarks>By default, it's set to <seelangword="false" />, and <exceptioncref="T:System.Text.Json.JsonException" /> is thrown if trailing content is encountered after the first top-level JSON value.</remarks>
59
+
<summary>Gets or sets a value that indicates whether the <seecref="T:System.Text.Json.Utf8JsonReader" /> should tolerate zero or more top-level JSON values that are whitespace separated.</summary>
60
+
<value>
61
+
<seelangword="true" /> if the <seecref="T:System.Text.Json.Utf8JsonReader" /> should tolerate zero or more top-level JSON values that are whitespace separated. The default is <seelangword="false" />.</value>
62
+
<remarks>To be added.</remarks>
63
+
<exceptioncref="T:System.Text.Json.JsonException">Trailing content was encountered after the first top-level JSON value.</exception>
64
64
</Docs>
65
65
</Member>
66
66
<MemberMemberName="AllowTrailingCommas">
@@ -92,14 +92,12 @@ For more information, see [How to write custom serializers and deserializers wit
92
92
<ReturnType>System.Boolean</ReturnType>
93
93
</ReturnValue>
94
94
<Docs>
95
-
<summary>Gets or sets a value that defines whether an extra comma at the end of a list of JSON values in an object or array is allowed (and ignored) within the JSON payload being read.</summary>
95
+
<summary>Gets or sets a value that defines whether an extra comma at the end of a list of JSON values in an object or array is allowed (and ignored) within the JSON payload being read.</summary>
96
96
<value>
97
97
<seelangword="true" /> if an extra comma is allowed; otherwise, <seelangword="false" />.</value>
98
98
<remarks>
99
99
<formattype="text/markdown"><![CDATA[
100
100
101
-
## Remarks
102
-
103
101
By default, this property is set to `false`, and a <xref:System.Text.Json.JsonException> is thrown if a trailing comma is encountered.
104
102
105
103
]]></format>
@@ -140,8 +138,6 @@ By default, this property is set to `false`, and a <xref:System.Text.Json.JsonEx
140
138
<remarks>
141
139
<formattype="text/markdown"><![CDATA[
142
140
143
-
## Remarks
144
-
145
141
By default, the reader throws a <xref:System.Text.Json.JsonException> if it encounters a comment.
146
142
147
143
]]></format>
@@ -180,15 +176,7 @@ By default, the reader throws a <xref:System.Text.Json.JsonException> if it enco
180
176
<Docs>
181
177
<summary>Gets or sets the maximum depth allowed when reading JSON, with the default (that is, 0) indicating a maximum depth of 64. </summary>
182
178
<value>The maximum depth allowed when reading JSON.</value>
183
-
<remarks>
184
-
<formattype="text/markdown"><![CDATA[
185
-
186
-
## Remarks
187
-
188
-
Reading past this depth will throw a <xref:System.Text.Json.JsonException>.
189
-
190
-
]]></format>
191
-
</remarks>
179
+
<remarks>Reading past this depth will throw a <seecref="T:System.Text.Json.JsonException" />.</remarks>
192
180
<exceptioncref="T:System.ArgumentOutOfRangeException">The maximum depth is being set to a negative value.</exception>
<para>The JSON is invalid, or when there is remaining data in the PipeReader.</para>
2496
+
<para>The JSON is invalid, or there is remaining data in the PipeReader.</para>
2497
2497
</exception>
2498
2498
</Docs>
2499
2499
</Member>
@@ -2535,7 +2535,7 @@ The <xref:System.Text.Json.JsonReaderOptions> used to create the instance of the
2535
2535
<exception cref="T:System.ArgumentNullException">
2536
2536
<paramref name="utf8Json" /> or <paramref name="jsonTypeInfo" /> is <see langword="null" />.</exception>
2537
2537
<exception cref="T:System.Text.Json.JsonException">The JSON is invalid,
2538
-
or when there is remaining data in the Stream.</exception>
2538
+
or there is remaining data in the Stream.</exception>
2539
2539
<exception cref="T:System.OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception>
2540
2540
</Docs>
2541
2541
</Member>
@@ -2596,7 +2596,7 @@ The <xref:System.Text.Json.JsonReaderOptions> used to create the instance of the
2596
2596
<exception cref="T:System.ArgumentNullException">
2597
2597
<paramref name="utf8Json" /> or <paramref name="returnType" /> is <see langword="null" />.</exception>
<para>The JSON is invalid, the <paramref name="returnType" /> is not compatible with the JSON, or when there is remaining data in the PipeReader.</para>
2599
+
<para>The JSON is invalid, the <paramref name="returnType" /> is not compatible with the JSON, or there is remaining data in the PipeReader.</para>
2600
2600
</exception>
2601
2601
<exception cref="T:System.NotSupportedException">
2602
2602
<para>There is no compatible <see cref="T:System.Text.Json.Serialization.JsonConverter" /> for <paramref name="returnType" /> or its serializable members.</para>
@@ -2643,7 +2643,7 @@ The <xref:System.Text.Json.JsonReaderOptions> used to create the instance of the
2643
2643
<exception cref="T:System.ArgumentNullException">
2644
2644
<paramref name="utf8Json" />, <paramref name="returnType" />, or <paramref name="context" /> is <see langword="null" />.</exception>
<para>The JSON is invalid, the <paramref name="returnType" /> is not compatible with the JSON, or when there is remaining data in the PipeReader.</para>
2646
+
<para>The JSON is invalid, the <paramref name="returnType" /> is not compatible with the JSON, or there is remaining data in the PipeReader.</para>
2647
2647
</exception>
2648
2648
<exception cref="T:System.NotSupportedException">
2649
2649
<para>There is no compatible <see cref="T:System.Text.Json.Serialization.JsonConverter" /> for <paramref name="returnType" /> or its serializable members.</para>
@@ -2851,7 +2851,7 @@ There is remaining data in the stream.</exception>
2851
2851
<exception cref="T:System.ArgumentNullException">
2852
2852
<paramref name="utf8Json" /> is <see langword="null" />.</exception>
<para>The JSON is invalid, <typeparamref name="TValue" /> is not compatible with the JSON, or when there is remaining data in the PipeReader.</para>
2854
+
<para>The JSON is invalid, <typeparamref name="TValue" /> is not compatible with the JSON, or there is remaining data in the PipeReader.</para>
2855
2855
</exception>
2856
2856
<exception cref="T:System.NotSupportedException">
2857
2857
<para>There is no compatible <see cref="T:System.Text.Json.Serialization.JsonConverter" /> for <typeparamref name="TValue" /> or its serializable members.</para>
@@ -2907,7 +2907,7 @@ There is remaining data in the stream.</exception>
2907
2907
<exception cref="T:System.ArgumentNullException">
2908
2908
<paramref name="utf8Json" /> or <paramref name="jsonTypeInfo" /> is <see langword="null" />.</exception>
Copy file name to clipboardExpand all lines: xml/System.Text.Json/JsonSerializerOptions.xml
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -192,13 +192,13 @@ similar to how <xref:System.Text.Json.Serialization.Metadata.JsonTypeInfoResolve
192
192
<ReturnType>System.Boolean</ReturnType>
193
193
</ReturnValue>
194
194
<Docs>
195
-
<summary>Defines whether duplicate property names are allowed when deserializing JSON objects.</summary>
196
-
<value>To be added.</value>
195
+
<summary>Gets or sets a value that indicates whether duplicate property names are allowed when deserializing JSON objects.</summary>
196
+
<value><seelangword="true" /> if duplicate property names are allowed when deserializing JSON objects. The default is <seelangword="true" />.</value>
197
197
<remarks>
198
-
<para>By default, it's set to <seelangword="true" />. If set to <seelangword="false" />, <seecref="T:System.Text.Json.JsonException" /> is thrown when a duplicate property name is encountered during deserialization.</para>
198
+
<para>If set to <seelangword="false" />, <seecref="T:System.Text.Json.JsonException" /> is thrown when a duplicate property name is encountered during deserialization.</para>
199
199
<para>Duplicate property names are not allowed in serialization.</para>
200
200
</remarks>
201
-
<exceptioncref="T:System.InvalidOperationException">Thrown if this property is set after serialization or deserialization has occurred.</exception>
201
+
<exceptioncref="T:System.InvalidOperationException">This property is set after serialization or deserialization has occurred.</exception>
@@ -218,9 +218,9 @@ similar to how <xref:System.Text.Json.Serialization.Metadata.JsonTypeInfoResolve
218
218
<ReturnType>System.Boolean</ReturnType>
219
219
</ReturnValue>
220
220
<Docs>
221
-
<summary>Allows JSON metadata properties to be specified after regular properties in a deserialized JSON object.</summary>
222
-
<value>To be added.</value>
223
-
<remarks>When set to <seelangword="true" />, removes the requirement that JSON metadata properties, such as \\$id and \\$type, be specified at the very start of the deserialized JSON object. If you enable this setting, it can result in over-buffering when deserializing large JSON payloads in the context of streaming deserialization.
221
+
<summary>Gets or sets a value that indicates whether JSON metadata properties can be specified after regular properties in a deserialized JSON object.</summary>
222
+
<value><seelangword="true" /> if JSON metadata properties, such as \\$id and \\$type, aren't required to be specified at the very start of the deserialized JSON object; <seelangword="false" /> if JSON metadata properties must be specified before regular properties.</value>
223
+
<remarks>If you enable this setting, it can result in over-buffering when deserializing large JSON payloads in the context of streaming deserialization.
224
224
</remarks>
225
225
<exceptioncref="T:System.InvalidOperationException">This property is set after serialization or deserialization has occurred.</exception>
226
226
</Docs>
@@ -797,7 +797,7 @@ For more information, see [How to ignore properties with System.Text.Json](/dotn
797
797
<remarks>Allowed characters are space and horizontal tab.</remarks>
Copy file name to clipboardExpand all lines: xml/System.Text.Json/JsonWriterOptions.xml
+8-16Lines changed: 8 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@
33
33
34
34
## Remarks
35
35
36
-
By default, the JSON is written without any indentation or extra white space.
36
+
By default, the JSON is written without any indentation or extra white space.
37
37
Also, <xref:System.Text.Json.Utf8JsonWriter> throws an exception if the user attempts to write structurally invalid JSON.
38
38
39
39
For more information, see [How to write custom serializers and deserializers with System.Text.Json](/dotnet/standard/serialization/write-custom-serializer-deserializer#use-utf8jsonwriter).
@@ -195,18 +195,10 @@ For more information, see [How to write custom serializers and deserializers wit
195
195
<ReturnType>System.Int32</ReturnType>
196
196
</ReturnValue>
197
197
<Docs>
198
-
<summary>Gets or sets the maximum depth allowed when writing JSON, with the default (that is, 0) indicating a max depth of 1000.</summary>
198
+
<summary>Gets or sets the maximum depth allowed when writing JSON, with the default (that is, 0) indicating a maximum depth of 1000.</summary>
199
199
<value>To be added.</value>
200
-
<remarks>
201
-
<formattype="text/markdown"><![CDATA[
202
-
203
-
## Remarks
204
-
205
-
Reading past this depth will throw a <exception cref="T:System.Text.Json.JsonException>.
206
-
207
-
]]></format>
208
-
</remarks>
209
-
<exceptioncref="T:System.ArgumentOutOfRangeException">Thrown when the max depth is set to a negative value.</exception>
200
+
<remarks>Writing past this depth will throw a <seecref="T:System.Text.Json.JsonException" />.</remarks>
201
+
<exceptioncref="T:System.ArgumentOutOfRangeException">The max depth is set to a negative value.</exception>
210
202
</Docs>
211
203
</Member>
212
204
<MemberMemberName="NewLine">
@@ -232,8 +224,8 @@ Reading past this depth will throw a <exception cref="T:System.Text.Json.JsonExc
232
224
</summary>
233
225
<value>To be added.</value>
234
226
<remarks>To be added.</remarks>
235
-
<exceptioncref="T:System.ArgumentNullException">Thrown when the new line string is <seelangword="null" />.</exception>
236
-
<exceptioncref="T:System.ArgumentOutOfRangeException">Thrown when the new line string is not <c>\n</c> or <c>\r\n</c>.</exception>
227
+
<exceptioncref="T:System.ArgumentNullException">The new line string is <seelangword="null" />.</exception>
228
+
<exceptioncref="T:System.ArgumentOutOfRangeException">The new line string is not <c>\n</c> or <c>\r\n</c>.</exception>
237
229
</Docs>
238
230
</Member>
239
231
<MemberMemberName="SkipValidation">
@@ -264,12 +256,12 @@ Reading past this depth will throw a <exception cref="T:System.Text.Json.JsonExc
264
256
<seelangword="true" /> if structural validation is skipped and invalid JSON is allowed; <seelangword="false" /> if an <seecref="T:System.InvalidOperationException" /> is thrown on any attempt to write invalid JSON.
265
257
</value>
266
258
<remarks>
267
-
<formattype="text/markdown"><![CDATA[
259
+
<formattype="text/markdown"><![CDATA[
268
260
269
261
## Remarks
270
262
271
263
If the JSON being written is known to be correct, then skipping validation (by setting this property to `true`) could improve performance.
272
-
An example of invalid JSON where the writer will throw (when `SkipValidation` is set to `false`) is when you write a value within a JSON object without a property name.
264
+
An example of invalid JSON where the writer will throw (when `SkipValidation` is set to `false`) is when you write a value within a JSON object without a property name.
0 commit comments