MvcNewtonsoftJsonOptions.AllowInputFormatterExceptionMessages 속성

정의

에 의한 JSON 역직렬화 NewtonsoftJsonInputFormatter 의 오류 메시지가 에 추가될지 여부를 결정하는 플래그를 ModelStateDictionary가져오거나 설정합니다. 이면 false제네릭 오류 메시지가 대신 사용됩니다.

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

속성 값

기본값은 true입니다.

설명

의 오류 메시지는 ModelStateDictionary HTML로 또는 를 사용하여 BadRequestObjectResult클라이언트에 전달되는 경우가 많습니다. 실제로 이 설정은 클라이언트가 제출된 JSON 데이터에 대한 자세한 오류 메시지를 받을 수 있는지 여부를 제어합니다.

적용 대상