JsonPropertyInfo.IsGetNullable 속성

정의

getter의 반환 형식에 nullable로 주석이 추가되었는지 여부를 나타내는 값을 가져오거나 설정합니다.

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

속성 값

예외

JsonPropertyInfo 추가 수정을 위해 인스턴스가 잠겼습니다.

-또는-

현재 PropertyType 가 참조 형식이 아니거나 Nullable<T>.

설명

이 속성의 시작 DefaultJsonTypeInfoResolver 또는 JsonSerializerContext파생 계약은 같은 특성 NotNullAttributeMaybeNullAttribute의 주석을 포함하여 nullable 참조 형식 주석에서 이 속성의 값을 파생합니다.

이 속성은 속성을 사용하도록 설정하지 않은 한 RespectNullableAnnotations serialization에 영향을 주지 않습니다. 이 경우 serializer는 getter에서 반환된 값을 null 거부합니다.

적용 대상