JsonOptions 類別

定義

C#
public class JsonOptions
繼承
JsonOptions

建構函式

屬性

AllowInputFormatterExceptionMessages

取得或設定旗標,以判斷 是否將 來自 SystemTextJsonInputFormatter JSON 還原序列化的錯誤訊息新增至 ModelStateDictionary 。 如果 false 為 ,則會改用泛型錯誤訊息。

JsonSerializerOptions

JsonSerializerOptions取得 和 SystemTextJsonOutputFormatter 所使用的 SystemTextJsonInputFormatter

適用於

產品 版本
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0