diff --git a/src/Mvc/Mvc.Core/src/MvcOptions.cs b/src/Mvc/Mvc.Core/src/MvcOptions.cs index c5d2ea5d16..c7925d3331 100644 --- a/src/Mvc/Mvc.Core/src/MvcOptions.cs +++ b/src/Mvc/Mvc.Core/src/MvcOptions.cs @@ -323,19 +323,7 @@ namespace Microsoft.AspNetCore.Mvc /// Gets the used by and /// . /// - public JsonSerializerOptions SerializerOptions { get; } = new JsonSerializerOptions - { - // Allow for the payload to have null values for some inputs (under-binding) - IgnoreNullPropertyValueOnRead = true, - - ReaderOptions = new JsonReaderOptions - { - // Limit the object graph we'll consume to a fixed depth. This prevents stackoverflow exceptions - // from deserialization errors that might occur from deeply nested objects. - // This value is to be kept in sync with JsonSerializerSettingsProvider.DefaultMaxDepth - MaxDepth = DefaultMaxModelBindingRecursionDepth, - }, - }; + public JsonSerializerOptions SerializerOptions { get; } = new JsonSerializerOptions(); IEnumerator IEnumerable.GetEnumerator() => _switches.GetEnumerator();