JsonParameterInfo.IsNullable Property

Definition

Gets a value indicating whether the constructor parameter is annotated as nullable.

public:
 property bool IsNullable { bool get(); };
public bool IsNullable { get; }
member this.IsNullable : bool
Public ReadOnly Property IsNullable As Boolean

Property Value

Remarks

Contracts originating from DefaultJsonTypeInfoResolver or JsonSerializerContext,

derive the value of this parameter from nullable reference type annotations, including annotations

from attributes such as AllowNullAttribute or DisallowNullAttribute.

This property has no effect on deserialization unless the RespectNullableAnnotations

property has been enabled, in which case the serializer will reject any null deserialization results.

This setting is in sync with the associated IsSetNullable property.

Applies to