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
<summary>Provides options to be used with <seecref="T:System.Text.Json.JsonSerializer" />.</summary>
18
18
<remarks>To be added.</remarks>
19
19
</Docs>
20
20
<Members>
@@ -31,7 +31,7 @@
31
31
</AssemblyInfo>
32
32
<Parameters />
33
33
<Docs>
34
-
<summary>To be added.</summary>
34
+
<summary>Initializes a new instance of the <seecref="T:System.Text.Json.JsonSerializerOptions" /> class.</summary>
35
35
<remarks>To be added.</remarks>
36
36
</Docs>
37
37
</Member>
@@ -51,9 +51,18 @@
51
51
<ReturnType>System.Boolean</ReturnType>
52
52
</ReturnValue>
53
53
<Docs>
54
-
<summary>To be added.</summary>
55
-
<value>To be added.</value>
56
-
<remarks>To be added.</remarks>
54
+
<summary>Get or sets a value that indicates 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 deserialized.</summary>
55
+
<value><seelangword="true" /> if an extra comma at the end of a list of JSON values in an object or array is allowed (and ignored); <seelangword="false" /> otherwise.</value>
56
+
<remarks>
57
+
<formattype="text/markdown"><![CDATA[
58
+
59
+
## Remarks
60
+
61
+
By default, `AllowTrailingCommas` is set to `false`, and a <exception cref="T:System.Text.Json.JsonException> is thrown if a trailing comma is encountered.
62
+
63
+
]]></format>
64
+
</remarks>
65
+
<exceptioncref="T:System.InvalidOperationException">This property was set after serialization or deserialization has occurred.</exception>
<summary>Gets or sets the policy used to convert a <seecref="T:System.Collections.IDictionary" /> key's name to another format, such as camel-casing.</summary>
145
+
<value>The policy used to convert a <seecref="T:System.Collections.IDictionary" /> key's name to another format.</value>
146
+
<remarks>
147
+
<formattype="text/markdown"><![CDATA[
148
+
149
+
## Remarks
150
+
151
+
This property can be set to <xref:System.Text.Json.JsonNamingPolicy.CamelCase?displayProperty=nameWithType> to specify a camel-casing policy.
152
+
153
+
This property can be set to <xref:System.Text.Json.JsonNamingPolicy.CamelCase> to specify a camel-casing policy.
<paramname="typeToConvert">The type to return a converter for.</param>
181
+
<summary>Returns the converter for the specified type.</summary>
182
+
<returns>The first converter that supports the given type, or <seelangword="null" /> if there is no converter.</returns>
144
183
<remarks>To be added.</remarks>
145
184
</Docs>
146
185
</Member>
@@ -160,9 +199,10 @@
160
199
<ReturnType>System.Boolean</ReturnType>
161
200
</ReturnValue>
162
201
<Docs>
163
-
<summary>To be added.</summary>
164
-
<value>To be added.</value>
202
+
<summary>Gets or sets a value that determines whether <seelangword="null" /> values are ignored during serialization and deserialization. The default value is <seelangword="false" />.</summary>
203
+
<value><seelangword="true" /> to ignore null values during serialization and deserialization; otherwise, see langword="false" />.</value>
165
204
<remarks>To be added.</remarks>
205
+
<exceptioncref="T:System.InvalidOperationException">This property was set after serialization or deserialization has occurred.</exception>
166
206
</Docs>
167
207
</Member>
168
208
<MemberMemberName="IgnoreReadOnlyProperties">
@@ -181,9 +221,20 @@
181
221
<ReturnType>System.Boolean</ReturnType>
182
222
</ReturnValue>
183
223
<Docs>
184
-
<summary>To be added.</summary>
185
-
<value>To be added.</value>
186
-
<remarks>To be added.</remarks>
224
+
<summary>Gets a value that determines whether read-only properties are ignored during serialization. The default value is <seelangword="false" />.</summary>
225
+
<value><seelangword="true" /> to ignore read-only properties during serialization; otherwise, <seelangword="false" />.</value>
226
+
<remarks>
227
+
<formattype="text/markdown"><![CDATA[
228
+
229
+
## Remarks
230
+
231
+
A property is read-only if it contains a public getter but not a public setter.
232
+
233
+
Read-only properties are not deserialized regardless of this setting.
234
+
235
+
]]></format>
236
+
</remarks>
237
+
<exceptioncref="T:System.InvalidOperationException">This property was set after serialization or deserialization has occurred.</exception>
187
238
</Docs>
188
239
</Member>
189
240
<MemberMemberName="MaxDepth">
@@ -202,9 +253,19 @@
202
253
<ReturnType>System.Int32</ReturnType>
203
254
</ReturnValue>
204
255
<Docs>
205
-
<summary>To be added.</summary>
206
-
<value>To be added.</value>
207
-
<remarks>To be added.</remarks>
256
+
<summary>Gets or sets the maximum depth allowed when serializing or deserializing JSON, with the default value of 0 indicating a maximum depth of 64.</summary>
257
+
<value>The maximum depth allowed when serializing or deserializing JSON.</value>
258
+
<remarks>
259
+
<formattype="text/markdown"><![CDATA[
260
+
261
+
## Remarks
262
+
263
+
Going past this depth will throw a <exception cref="T:System.Text.Json.JsonException>.
264
+
265
+
]]></format>
266
+
</remarks>
267
+
<exceptioncref="T:System.InvalidOperationException">This property was set after serialization or deserialization has occurred.</exception>
268
+
<exceptioncref="T:System.ArgumentOutOfRangeException">The max depth is set to a negative value.</exception>
208
269
</Docs>
209
270
</Member>
210
271
<MemberMemberName="PropertyNameCaseInsensitive">
@@ -223,9 +284,17 @@
223
284
<ReturnType>System.Boolean</ReturnType>
224
285
</ReturnValue>
225
286
<Docs>
226
-
<summary>To be added.</summary>
227
-
<value>To be added.</value>
228
-
<remarks>To be added.</remarks>
287
+
<summary>Gets or sets a value that determines whether a property's name uses a case-insensitive comparison during deserialization. The default value is <seelangword="false" />.</summary>
288
+
<value><seelangword="true" /> to compare property names using case-insensitive comparison; otherwise, <seelangword="false" />.</value>
289
+
<remarks>
290
+
<formattype="text/markdown"><![CDATA[
291
+
292
+
## Remarks
293
+
294
+
There is a performance cost associated with case-insensitie comparison (that is, when `PropertyNameCaseInsensitive` is `true`).
<summary>Gets or sets a value that specifies the policy used to convert a property's name on an object to another format, such as camel-casing. </summary>
317
+
<value>One of the enum values from <seecref="T:System.Text.Json.JsonNamingPolicy" />.</value>
318
+
<remarks>
319
+
<formattype="text/markdown"><![CDATA[
320
+
321
+
## Remarks
322
+
323
+
The resulting property name is expected to match the JSON payload during deserialization, and will be used when writing the property name during serialization.
324
+
325
+
The policy is not used for properties that have a <xref:System.Text.Json.Serialization.JsonPropertyNameAttribute> applied.
326
+
327
+
This property can be set to <xref:System.Text.Json.JsonNamingPolicy.CamelCase?displayProperty=nameWithType> to specify a camel-casing policy.
<summary>Gets or sets a value that defines how comments are handled during deserialization.</summary>
350
+
<value>A value that indicates whether comments are allowed, disallowed, or skipped.</value>
351
+
<remarks>
352
+
<formattype="text/markdown"><![CDATA[
353
+
354
+
## Remarks
355
+
356
+
By default, a <exception cref="T:System.Text.Json.JsonException> is thrown if a comment is encountered.
357
+
358
+
]]></format>
359
+
</remarks>
360
+
<exceptioncref="T:System.InvalidOperationException">This property was set after serialization or deserialization has occurred.</exception>
361
+
<exceptioncref="T:System.ArgumentOutOfRangeException">The comment handling enum is set to a value that is not supported (or not within the <seecref="T:System.Text.Json.JsonCommentHandling" /> enum range).</exception>
271
362
</Docs>
272
363
</Member>
273
364
<MemberMemberName="WriteIndented">
@@ -286,10 +377,21 @@
286
377
<ReturnType>System.Boolean</ReturnType>
287
378
</ReturnValue>
288
379
<Docs>
289
-
<summary>To be added.</summary>
290
-
<value>To be added.</value>
291
-
<remarks>To be added.</remarks>
380
+
<summary>Gets or sets a value that defines whether JSON should use pretty printing. By default, JSON is serialized without any extra white space.</summary>
381
+
<value><seelangword="true"/> if JSON should pretty print on serialization; otherwise, <seelangword="false"/>. The default is <seelangword="false"/>.</value>
382
+
<remarks>
383
+
<formattype="text/markdown"><![CDATA[
384
+
385
+
Pretty printing includes:
386
+
387
+
- Indenting nested JSON tokens.
388
+
- Adding new lines
389
+
- Adding white space between property names and values.
390
+
391
+
]]></format>
392
+
</remarks>
393
+
<exceptioncref="T:System.InvalidOperationException">This property was set after serialization or deserialization has occurred.</exception>
0 commit comments