From 9fc3a09a19d0224d25c3b2af15c02df7371c2270 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:23:20 +0000 Subject: [PATCH 1/3] Initial plan From 4f7bf314f1c0bd3fd7b793987238309a7473e95d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:26:13 +0000 Subject: [PATCH 2/3] Update JsonSerializerDefaults.Strict documentation with detailed behavior Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com> --- .../JsonSerializerDefaults.xml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/xml/System.Text.Json/JsonSerializerDefaults.xml b/xml/System.Text.Json/JsonSerializerDefaults.xml index 713c755e81d..6e33979ddc9 100644 --- a/xml/System.Text.Json/JsonSerializerDefaults.xml +++ b/xml/System.Text.Json/JsonSerializerDefaults.xml @@ -79,7 +79,23 @@ This option implies that property names are treated as case-sensitive and that " 2 - Specifies that stricter policies should be applied when deserializing from JSON. + + Option values appropriate for strict JSON parsing. + This member implies that: + - Unmapped JSON properties are disallowed. + - Duplicate JSON properties aren't allowed. + - Nullable reference type annotations are respected. + - Required constructor parameters are respected. + + + + From 95e45a92381ce2e91b62096a8859b43b5c41de44 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 22 Jan 2026 11:10:49 -0800 Subject: [PATCH 3/3] Refactor remarks sections for JSON serializer options --- .../JsonSerializerDefaults.xml | 49 ++++++------------- 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/xml/System.Text.Json/JsonSerializerDefaults.xml b/xml/System.Text.Json/JsonSerializerDefaults.xml index 6e33979ddc9..ad775151725 100644 --- a/xml/System.Text.Json/JsonSerializerDefaults.xml +++ b/xml/System.Text.Json/JsonSerializerDefaults.xml @@ -50,15 +50,7 @@ General-purpose option values. These are the same settings that are applied if a member isn't specified. For information about the default property values that are applied, see JsonSerializerOptions properties. - - - + This option implies that property names are treated as case-sensitive and that "PascalCase" name formatting should be employed. @@ -82,20 +74,14 @@ This option implies that property names are treated as case-sensitive and that " Option values appropriate for strict JSON parsing. This member implies that: - - Unmapped JSON properties are disallowed. - - Duplicate JSON properties aren't allowed. - - Nullable reference type annotations are respected. - - Required constructor parameters are respected. + + Unmapped JSON properties aren't allowed. + Duplicate JSON properties aren't allowed. + Nullable reference type annotations are respected. + Required constructor parameters are respected. + - - - + This option configures stricter deserialization behavior that rejects unmapped or duplicate properties, and enforces both nullable annotations and required constructor parameters. @@ -124,19 +110,14 @@ This option configures stricter deserialization behavior that rejects unmapped p Option values appropriate to Web-based scenarios. This member implies that: - - Property names are treated as case-insensitive. - - "camelCase" name formatting should be employed. - - Quoted numbers (JSON strings for number properties) are allowed. + + Integers must be encoded as small as possible. + Property names are treated as case-insensitive. + "camelCase" name formatting should be employed. + Quoted numbers (JSON strings for number properties) are allowed. + - - - + This option implies that property names are treated as case-insensitive and that "camelCase" name formatting should be employed.