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
Summary
After upgrading from Newtonsoft.Json v12 to v13, we encountered breaking changes due to the default value of MaxDepth being changed from null to 64. This is causing deserialization failures in our application where deeply nested objects exist.
Steps to Reproduce
In Newtonsoft.Json v12, the MaxDepth setting was null by default, allowing unrestricted depth.
In Newtonsoft.Json v13, the default MaxDepth is now 64, leading to JsonReaderException for deep object graphs.
Manually setting MaxDepth = null in JsonSerializerSettings resolves the issue.
Questions & Concerns
Why was the decision made to change the default MaxDepth from null to 64?
Understanding the reasoning behind this change will help us assess its impact and the intended behavior moving forward.
Is it safe to explicitly set MaxDepth = null in JsonSerializerSettings?
While this fixes our issue, we want to ensure this is a recommended approach and won’t lead to unexpected problems in the current or future versions.
Expected Behavior
Either restore MaxDepth = null as the default or provide official guidance on safely handling deep object deserialization without unexpected failures.
Would appreciate any insights or recommendations regarding this change. Thank you!
The text was updated successfully, but these errors were encountered:
Summary
After upgrading from Newtonsoft.Json v12 to v13, we encountered breaking changes due to the default value of MaxDepth being changed from null to 64. This is causing deserialization failures in our application where deeply nested objects exist.
Steps to Reproduce
Questions & Concerns
Expected Behavior
Would appreciate any insights or recommendations regarding this change. Thank you!
The text was updated successfully, but these errors were encountered: