JsonPropertyInfo.IsGetNullable 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,表示該取物的回傳類型是否被註解為可空。
public:
property bool IsGetNullable { bool get(); void set(bool value); };
public bool IsGetNullable { get; set; }
member this.IsGetNullable : bool with get, set
Public Property IsGetNullable As Boolean
屬性值
例外狀況
備註
來自DefaultJsonTypeInfoResolver或 JsonSerializerContext的合約,從可空的參考類型註解推導出此屬性的價值,包括屬性NotNullAttributeMaybeNullAttribute如 或 的註解。
此特性對序列化不影響,除非啟用此功能 RespectNullableAnnotations ,否則序列化器會拒絕接收器回傳的任何 null 值。