From ff93ab44027eb45b027118b2c46dcc8fd62c591c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakov=20Kristovi=C4=87?= <37014410+TheJakov@users.noreply.github.com> Date: Fri, 12 Apr 2024 09:09:09 +0200 Subject: [PATCH 1/2] Update migrate-from-newtonsoft.md Newtonsoft.Json v13.01 Change - JsonReader and JsonSerializer MaxDepth defaults to 64 https://github.com/JamesNK/Newtonsoft.Json/releases/tag/13.0.1 --- .../serialization/system-text-json/migrate-from-newtonsoft.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/standard/serialization/system-text-json/migrate-from-newtonsoft.md b/docs/standard/serialization/system-text-json/migrate-from-newtonsoft.md index da421bc5734c2..5e754b3919ff7 100644 --- a/docs/standard/serialization/system-text-json/migrate-from-newtonsoft.md +++ b/docs/standard/serialization/system-text-json/migrate-from-newtonsoft.md @@ -99,7 +99,7 @@ The following table lists `Newtonsoft.Json` features and `System.Text.Json` equi | Allow comments | ✔️ [ReadCommentHandling global setting](#comments) | | Allow trailing commas | ✔️ [AllowTrailingCommas global setting](#trailing-commas) | | Custom converter registration | ✔️ [Order of precedence differs](#converter-registration-precedence) | -| No maximum depth by default | ✔️ [Default maximum depth 64, configurable](#maximum-depth) | +| Default maximum depth 64, configurable | ✔️ [Default maximum depth 64, configurable](#maximum-depth) | | `PreserveReferencesHandling` global setting | ✔️ [ReferenceHandling global setting](#preserve-object-references-and-handle-loops) | | Serialize or deserialize numbers in quotes | ✔️ [NumberHandling global setting, [JsonNumberHandling] attribute](#allow-or-write-numbers-in-quotes) | | Deserialize to immutable classes and structs | ✔️ [JsonConstructor, C# 9 Records](#deserialize-to-immutable-classes-and-structs) | From 4bde26610b5fcdc3db67d9b6760fdbfe12338cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakov=20Kristovi=C4=87?= <37014410+TheJakov@users.noreply.github.com> Date: Sat, 13 Apr 2024 13:13:19 +0200 Subject: [PATCH 2/2] Update Default maximum depth for .NET 6/.NET 8 --- .../serialization/system-text-json/migrate-from-newtonsoft.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/standard/serialization/system-text-json/migrate-from-newtonsoft.md b/docs/standard/serialization/system-text-json/migrate-from-newtonsoft.md index 5e754b3919ff7..3717d2663bdcd 100644 --- a/docs/standard/serialization/system-text-json/migrate-from-newtonsoft.md +++ b/docs/standard/serialization/system-text-json/migrate-from-newtonsoft.md @@ -50,7 +50,7 @@ The following table lists `Newtonsoft.Json` features and `System.Text.Json` equi | Allow comments | ✔️ [ReadCommentHandling global setting](#comments) | | Allow trailing commas | ✔️ [AllowTrailingCommas global setting](#trailing-commas) | | Custom converter registration | ✔️ [Order of precedence differs](#converter-registration-precedence) | -| No maximum depth by default | ✔️ [Default maximum depth 64, configurable](#maximum-depth) | +| Default maximum depth 64, configurable | ✔️ [Default maximum depth 64, configurable](#maximum-depth) | | `PreserveReferencesHandling` global setting | ✔️ [ReferenceHandling global setting](#preserve-object-references-and-handle-loops) | | Serialize or deserialize numbers in quotes | ✔️ [NumberHandling global setting, [JsonNumberHandling] attribute](#allow-or-write-numbers-in-quotes) | | Deserialize to immutable classes and structs | ✔️ [JsonConstructor, C# 9 Records](#deserialize-to-immutable-classes-and-structs) | @@ -149,7 +149,7 @@ The following table lists `Newtonsoft.Json` features and `System.Text.Json` equi | Allow comments | ✔️ [ReadCommentHandling global setting](#comments) | | Allow trailing commas | ✔️ [AllowTrailingCommas global setting](#trailing-commas) | | Custom converter registration | ✔️ [Order of precedence differs](#converter-registration-precedence) | -| No maximum depth by default | ✔️ [Default maximum depth 64, configurable](#maximum-depth) | +| Default maximum depth 64, configurable | ✔️ [Default maximum depth 64, configurable](#maximum-depth) | | `PreserveReferencesHandling` global setting | ✔️ [ReferenceHandling global setting](#preserve-object-references-and-handle-loops) | | Serialize or deserialize numbers in quotes | ✔️ [NumberHandling global setting, [JsonNumberHandling] attribute](#allow-or-write-numbers-in-quotes) | | Deserialize to immutable classes and structs | ✔️ [JsonConstructor, C# 9 Records](#deserialize-to-immutable-classes-and-structs) |