Skip to content

Commit 4413cfd

Browse files
Merge pull request #8792 from eiriktsarpalis/update-addcontext-docs
Update JsonSerializerOptions.AddContext documentation.
2 parents 8f0e5da + 9a130a3 commit 4413cfd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

xml/System.Text.Json.Serialization.Metadata/JsonTypeInfoResolver.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Can be used to combine multiple <xref:System.Text.Json.Serialization.JsonSeriali
6363
]]></format>
6464
</remarks>
6565
<exception cref="T:System.ArgumentException">
66-
<paramref name="resolvers" /> or any of its elements is <see langword="null" />.</exception>
66+
<paramref name="resolvers" /> is <see langword="null" />.</exception>
6767
</Docs>
6868
</Member>
6969
</Members>

xml/System.Text.Json/JsonSerializerOptions.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,17 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa
126126
<Parameters />
127127
<Docs>
128128
<typeparam name="TContext">The generic definition of the specified context type.</typeparam>
129-
<summary>Binds current <see cref="T:System.Text.Json.JsonSerializerOptions" /> instance with a new instance of the specified <see cref="T:System.Text.Json.Serialization.JsonSerializerContext" /> type.</summary>
129+
<summary>Appends a new <see cref="T:System.Text.Json.Serialization.JsonSerializerContext" /> to the metadata resolution of the current <see cref="T:System.Text.Json.JsonSerializerOptions" /> instance.</summary>
130130
<remarks>
131131
<format type="text/markdown"><![CDATA[
132132
133133
## Remarks
134134
135135
When serializing and deserializing types using the options instance, metadata for the types will be fetched from the context instance.
136136
137+
The methods supports adding multiple contexts per options instance. Metadata will be resolved in the order of configuration,
138+
similar to how <xref:System.Text.Json.Serialization.Metadata.JsonTypeInfoResolver.Combine /> resolves metadata.
139+
137140
]]></format>
138141
</remarks>
139142
</Docs>

0 commit comments

Comments
 (0)