Skip to content

Commit 4f7bf31

Browse files
Update JsonSerializerDefaults.Strict documentation with detailed behavior
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
1 parent 9fc3a09 commit 4f7bf31

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

xml/System.Text.Json/JsonSerializerDefaults.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,23 @@ This option implies that property names are treated as case-sensitive and that "
7979
</ReturnValue>
8080
<MemberValue>2</MemberValue>
8181
<Docs>
82-
<summary>Specifies that stricter policies should be applied when deserializing from JSON.</summary>
82+
<summary>
83+
<para>Option values appropriate for strict JSON parsing.</para>
84+
<para>This member implies that:</para>
85+
<para>- Unmapped JSON properties are disallowed.</para>
86+
<para>- Duplicate JSON properties aren't allowed.</para>
87+
<para>- Nullable reference type annotations are respected.</para>
88+
<para>- Required constructor parameters are respected.</para>
89+
</summary>
90+
<remarks>
91+
<format type="text/markdown"><![CDATA[
92+
93+
## Remarks
94+
95+
This option configures stricter deserialization behavior that rejects unmapped properties, duplicate properties, and enforces both nullable annotations and required constructor parameters.
96+
97+
]]></format>
98+
</remarks>
8399
</Docs>
84100
</Member>
85101
<Member MemberName="Web">

0 commit comments

Comments
 (0)