JsonSerializerOptions.DefaultIgnoreCondition 屬性

定義

取得或設定值,這個值會決定序列化或還原序列化期間何時忽略具有預設值的屬性。 預設值是 Never

public:
 property System::Text::Json::Serialization::JsonIgnoreCondition DefaultIgnoreCondition { System::Text::Json::Serialization::JsonIgnoreCondition get(); void set(System::Text::Json::Serialization::JsonIgnoreCondition value); };
public System.Text.Json.Serialization.JsonIgnoreCondition DefaultIgnoreCondition { get; set; }
member this.DefaultIgnoreCondition : System.Text.Json.Serialization.JsonIgnoreCondition with get, set
Public Property DefaultIgnoreCondition As JsonIgnoreCondition

屬性值

JsonIgnoreCondition

例外狀況

此屬性設定為 Always

此屬性會在發生序列化或還原序列化後設定。

-或-

IgnoreNullValues 已設定為 true。 這些屬性不能同時使用。

適用於