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.Serialization/JsonExtensionDataAttribute.xml
+18-2Lines changed: 18 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,24 @@
19
19
</Attribute>
20
20
</Attributes>
21
21
<Docs>
22
-
<summary>To be added.</summary>
23
-
<remarks>To be added.</remarks>
22
+
<summary>When placed on a property of type <seecref="T:System.Collections.Generic.IDictionary`2" />, any properties that do not have a matching member are added to that Dictionary during deserialization and written during serialization.</summary>
23
+
<remarks>
24
+
<formattype="text/markdown">
25
+
<![CDATA[
26
+
27
+
## Remarks
28
+
29
+
The TKey value must be <xref:System.String> and TValue must be <xref:System.Text.Json.JsonElement> or <xref:System.Object>.
30
+
31
+
During deserializing, when using <xref:System.Object> a "null" JSON value is treated as a `null` object reference, and when using <xref:System.Text.Json.JsonElement> a "null" is treated as a JsonElement with <xref:System.Text.Json.JsonElement.ValueKind> set to <xref:System.Text.Json.JsonValueKind.Null>.
32
+
33
+
During serializing, the name of the extension data property is not included in the JSON; the data contained within the extension data is serialized as properties of the JSON object.
34
+
35
+
If there is more than one extension property on a type, or it the property is not of the correct type, an <xref:System.InvalidOperationException> is thrown during the first serialization or deserialization of that type.
Copy file name to clipboardExpand all lines: xml/System.Text.Json.Serialization/JsonPropertyNameAttribute.xml
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
</Attribute>
20
20
</Attributes>
21
21
<Docs>
22
-
<summary>To be added.</summary>
22
+
<summary>Specifies the property name that is present in the JSON when serializing and deserializing. This overrides any naming policy specified by <seecref="T:System.Text.Json.JsonNamingPolicy" />.</summary>
23
23
<remarks>To be added.</remarks>
24
24
</Docs>
25
25
<Members>
@@ -39,8 +39,8 @@
39
39
<ParameterName="name"Type="System.String" />
40
40
</Parameters>
41
41
<Docs>
42
-
<paramname="name">To be added.</param>
43
-
<summary>To be added.</summary>
42
+
<paramname="name">The name of the property.</param>
43
+
<summary>Initializes a new instance of <seecref="T:System.Text.Json.Serialization.JsonPropertyNameAttribute" /> with the specified property name.</summary>
44
44
<remarks>To be added.</remarks>
45
45
</Docs>
46
46
</Member>
@@ -60,8 +60,8 @@
60
60
<ReturnType>System.String</ReturnType>
61
61
</ReturnValue>
62
62
<Docs>
63
-
<summary>To be added.</summary>
64
-
<value>To be added.</value>
63
+
<summary>The name of the property.</summary>
64
+
<value>A string representing the name of the property.</value>
Copy file name to clipboardExpand all lines: xml/System.Text.Json/JsonElement.xml
+63-39Lines changed: 63 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -170,9 +170,22 @@ This method does not parse the contents of a JSON string value.
170
170
</ReturnValue>
171
171
<Parameters />
172
172
<Docs>
173
-
<summary>To be added.</summary>
174
-
<returns>To be added.</returns>
175
-
<remarks>To be added.</remarks>
173
+
<summary>Gets the value of the element as bytes.</summary>
174
+
<returns>The value decode to bytes.</returns>
175
+
<remarks>
176
+
<formattype="text/markdown">
177
+
<![CDATA[
178
+
179
+
## Remarks
180
+
181
+
This method does not create a byte[] representation of values other than base 64 encoded JSON strings.
182
+
183
+
]]>
184
+
</format>
185
+
</remarks>
186
+
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.ValueKind" /> is not <seecref="F:System.Text.Json.JsonValueKind.String" />.</exception>
187
+
<exceptioncref="T:System.FormatException">The value is not encoded as base 64 text and hence cannot be decoded to bytes.</exception>
188
+
<exceptioncref="T:System.ObjectDisposedException">The parent <seecref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
176
189
</Docs>
177
190
</Member>
178
191
<MemberMemberName="GetDateTime">
@@ -260,7 +273,7 @@ This method does not create a DateTimeOffset representation of values other than
260
273
<format><![CDATA[
261
274
262
275
This method does not parse the contents of a JSON string value.
263
-
276
+
264
277
]]></format>
265
278
</remarks>
266
279
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Number" />.</exception>
@@ -293,8 +306,8 @@ This method does not create a DateTimeOffset representation of values other than
293
306
This method does not parse the contents of a JSON string value.
294
307
295
308
On .NET Core, this method returns <xref:System.Double.PositiveInfinity?displayProperty=nameWithType> for values larger than <xref:System.Double.MaxValue?displayProperty=nameWithType>, and it returns <xref:System.Double.NegativeInfinity?displayProperty=nameWithType> for values smaller than <xref:System.Double.MinValue?displayProperty=nameWithType>.
296
-
297
-
]]></format>
309
+
310
+
]]></format>
298
311
</remarks>
299
312
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Number" />.</exception>
300
313
<exceptioncref="T:System.FormatException">The value cannot be represented as a <seecref="T:System.Double" />.</exception>
@@ -324,7 +337,7 @@ On .NET Core, this method returns <xref:System.Double.PositiveInfinity?displayPr
324
337
<format><![CDATA[
325
338
326
339
This method does not create a Guid representation of values other than JSON strings.
327
-
340
+
328
341
]]></format>
329
342
</remarks>
330
343
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.String" />.</exception>
@@ -380,7 +393,7 @@ This method does not create a Guid representation of values other than JSON stri
380
393
<format><![CDATA[
381
394
382
395
This method does not parse the contents of a JSON string value.
383
-
396
+
384
397
]]></format>
385
398
</remarks>
386
399
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Number" />.</exception>
@@ -416,8 +429,8 @@ This method does not parse the contents of a JSON string value.
416
429
Property name matching is performed as an ordinal, case-sensitive comparison.
417
430
418
431
If a property is defined multiple times for the same object, the method matches the last such definition.
419
-
420
-
]]></format>
432
+
433
+
]]></format>
421
434
</remarks>
422
435
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Object" />.</exception>
423
436
<exceptioncref="T:System.Collections.Generic.KeyNotFoundException">No property was found with the requested name.</exception>
@@ -452,8 +465,8 @@ If a property is defined multiple times for the same object, the method matches
452
465
Property name matching is performed as an ordinal, case-sensitive comparison.
453
466
454
467
If a property is defined multiple times for the same object, the method matches the last such definition.
455
-
456
-
]]></format>
468
+
469
+
]]></format>
457
470
</remarks>
458
471
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Object" />.</exception>
459
472
<exceptioncref="T:System.Collections.Generic.KeyNotFoundException">No property was found with the requested name.</exception>
@@ -493,8 +506,7 @@ If a property is defined multiple times for the same object, the method matches
493
506
</remarks>
494
507
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Object" />.</exception>
495
508
<exceptioncref="T:System.Collections.Generic.KeyNotFoundException">No property was found with the requested name.</exception>
496
-
<exceptioncref="T:System.ArgumentNullException">
497
-
<paramrefname="propertyName" /> is <seelangword="null" />.</exception>
509
+
<exceptioncref="T:System.ArgumentNullException"><paramrefname="propertyName" /> is <seelangword="null" />.</exception>
498
510
<exceptioncref="T:System.ObjectDisposedException">The parent <seecref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
499
511
</Docs>
500
512
</Member>
@@ -546,8 +558,8 @@ If a property is defined multiple times for the same object, the method matches
546
558
This method does not parse the contents of a JSON string value.
547
559
548
560
On .NET Core, this method returns <xref:System.Single.PositiveInfinity?displayProperty=nameWithType> for values larger than <xref:System.Single.MaxValue?displayProperty=nameWithType> and <xref:System.Single.NegativeInfinity?displayProperty=nameWithType> for values smaller than <xref:System.Single.MinValue?displayProperty=nameWithType>.
549
-
550
-
]]></format>
561
+
562
+
]]></format>
551
563
</remarks>
552
564
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Number" />.</exception>
553
565
<exceptioncref="T:System.FormatException">The value cannot be represented as a <seecref="T:System.Single" />.</exception>
@@ -680,8 +692,7 @@ This method does not parse the contents of a JSON string value.
680
692
<value>To be added.</value>
681
693
<remarks>To be added.</remarks>
682
694
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Array" />.</exception>
<paramrefname="index" /> is not in the range [0, <seecref="M:System.Text.Json.JsonElement.GetArrayLength" />()).</exception>
695
+
<exceptioncref="T:System.IndexOutOfRangeException"><paramrefname="index" /> is not in the range [0, <seecref="M:System.Text.Json.JsonElement.GetArrayLength" />()).</exception>
685
696
<exceptioncref="T:System.ObjectDisposedException">The parent <seecref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
686
697
</Docs>
687
698
</Member>
@@ -716,8 +727,8 @@ For <xref:System.Text.Json.JsonValueType.False?displayProperty=nameWithType>, <x
716
727
For <xref:System.Text.Json.JsonValueType.String?displayProperty=nameWithType>, the value of <xref:System.Text.Json.JsonElement.GetString> is returned.
717
728
718
729
For other types, the value of <xref:System.Text.Json.JsonElement.GetRawText> is returned.
719
-
720
-
]]></format>
730
+
731
+
]]></format>
721
732
</remarks>
722
733
<exceptioncref="T:System.ObjectDisposedException">The parent <seecref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
723
734
</Docs>
@@ -741,10 +752,24 @@ For other types, the value of <xref:System.Text.Json.JsonElement.GetRawText> is
<summary>Attempts to represent the current JSON string as bytes assuming it is base 64 encoded.</summary>
757
+
<returns>
758
+
<seelangword="true" /> if the entire token value is encoded as valid base 64 text and can be successfully decoded to bytes.
759
+
<seelangword="false" /> otherwise.</returns>
760
+
<remarks>
761
+
<formattype="text/markdown">
762
+
<![CDATA[
763
+
764
+
## Remarks
765
+
766
+
This method does not create a byte[] representation of values other than bsae 64 encoded JSON strings.
767
+
768
+
]]>
769
+
</format>
770
+
</remarks>
771
+
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.ValueKind" /> is not <seecref="F:System.Text.Json.JsonValueKind.String" />.</exception>
772
+
<exceptioncref="T:System.ObjectDisposedException">The parent <seecref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
748
773
</Docs>
749
774
</Member>
750
775
<MemberMemberName="TryGetDateTime">
@@ -772,7 +797,7 @@ For other types, the value of <xref:System.Text.Json.JsonElement.GetRawText> is
772
797
<seelangword="true" /> if the string can be represented as a <seecref="T:System.DateTime" />, <seelangword="false" /> otherwise.</returns>
773
798
<remarks>
774
799
<format><![CDATA[
775
-
800
+
776
801
This method does not create a DateTime representation of values other than JSON strings.
777
802
778
803
]]></format>
@@ -808,7 +833,7 @@ This method does not create a DateTime representation of values other than JSON
808
833
<format><![CDATA[
809
834
810
835
This method does not create a DateTimeOffset representation of values other than JSON strings.
811
-
836
+
812
837
]]></format>
813
838
</remarks>
814
839
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.String" />.</exception>
@@ -878,8 +903,8 @@ This method does not parse the contents of a JSON string value.
878
903
This method does not parse the contents of a JSON string value.
879
904
880
905
On .NET Core, this method does not return `false` for values larger than <xref:System.Double.MaxValue?displayProperty=nameWithType> or smaller than <xref:System.Double.MinValue?displayProperty=nameWithType>. Instead, it returns <see langword="true> and assigns <xref:System.Double.PositiveInfinity?displayProperty=nameWithType> or <xref:System.Double.NegativeInfinity?displayProperty=nameWithType> to `value`.
881
-
882
-
]]></format>
906
+
907
+
]]></format>
883
908
</remarks>
884
909
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Number" />.</exception>
885
910
<exceptioncref="T:System.ObjectDisposedException">The parent <seecref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
@@ -912,7 +937,7 @@ On .NET Core, this method does not return `false` for values larger than <xref:S
912
937
<format><![CDATA[
913
938
914
939
This method does not create a Guid representation of values other than JSON strings.
915
-
940
+
916
941
]]></format>
917
942
</remarks>
918
943
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.String" />.</exception>
@@ -1018,8 +1043,8 @@ This method does not parse the contents of a JSON string value.
1018
1043
Property name matching is performed as an ordinal, case-sensitive comparison.
1019
1044
1020
1045
If a property is defined multiple times for the same object, the method matches the last such definition.
1021
-
1022
-
]]></format>
1046
+
1047
+
]]></format>
1023
1048
</remarks>
1024
1049
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Object" />.</exception>
1025
1050
<exceptioncref="T:System.ObjectDisposedException">The parent <seecref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
@@ -1056,8 +1081,8 @@ If a property is defined multiple times for the same object, the method matches
1056
1081
Property name matching is performed as an ordinal, case-sensitive comparison.
1057
1082
1058
1083
If a property is defined multiple times for the same object, the method matches the last such definition.
1059
-
1060
-
]]></format>
1084
+
1085
+
]]></format>
1061
1086
</remarks>
1062
1087
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Object" />.</exception>
1063
1088
<exceptioncref="T:System.ObjectDisposedException">The parent <seecref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
@@ -1094,12 +1119,11 @@ If a property is defined multiple times for the same object, the method matches
1094
1119
Property name matching is performed as an ordinal, case-sensitive comparison.
1095
1120
1096
1121
If a property is defined multiple times for the same object, the method matches the last such definition.
1097
-
1098
-
]]></format>
1122
+
1123
+
]]></format>
1099
1124
</remarks>
1100
1125
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Object" />.</exception>
1101
-
<exceptioncref="T:System.ArgumentNullException">
1102
-
<paramrefname="propertyName" /> is <seelangword="null" />.</exception>
1126
+
<exceptioncref="T:System.ArgumentNullException"><paramrefname="propertyName" /> is <seelangword="null" />.</exception>
1103
1127
<exceptioncref="T:System.ObjectDisposedException">The parent <seecref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
1104
1128
</Docs>
1105
1129
</Member>
@@ -1132,8 +1156,8 @@ If a property is defined multiple times for the same object, the method matches
1132
1156
This method does not parse the contents of a JSON string value.
1133
1157
1134
1158
On .NET Core, this method does not return `false` for values larger than <xref:System.Single.MaxValue?displayProperty=nameWithType> or smaller than <xref:System.Single.MinValue?displayProperty=nameWithType>). Instead, it returns `false` and assigns <xref:System.Single.PositiveInfinity?displayProperty=nameWithType> or <xref:System.Single.NegativeInfinity?displayProperty=nameWithType> to the `value` argument.
1135
-
1136
-
]]></format>
1159
+
1160
+
]]></format>
1137
1161
</remarks>
1138
1162
<exceptioncref="T:System.InvalidOperationException">This value's <seecref="P:System.Text.Json.JsonElement.Type" /> is not <seecref="F:System.Text.Json.JsonValueType.Number" />.</exception>
1139
1163
<exceptioncref="T:System.ObjectDisposedException">The parent <seecref="T:System.Text.Json.JsonDocument" /> has been disposed.</exception>
0 commit comments