MvcNewtonsoftJsonOptions.AllowInputFormatterExceptionMessages Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a flag to determine whether error messages from JSON deserialization by the
NewtonsoftJsonInputFormatter will be added to the ModelStateDictionary. If
false
, a generic error message will be used instead.
public:
property bool AllowInputFormatterExceptionMessages { bool get(); void set(bool value); };
public bool AllowInputFormatterExceptionMessages { get; set; }
member this.AllowInputFormatterExceptionMessages : bool with get, set
Public Property AllowInputFormatterExceptionMessages As Boolean
Property Value
The default value is true
.
Remarks
Error messages in the ModelStateDictionary are often communicated to clients, either in HTML or using BadRequestObjectResult. In effect, this setting controls whether clients can receive detailed error messages about submitted JSON data.