Upravit

Sdílet prostřednictvím


JsonPropertyInfo.Name Property

Definition

Gets or sets the JSON property name used when serializing the property.

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
public string Name { get; set; }
member this.Name : string with get, set
Public Property Name As String

Property Value

Exceptions

value is null.

The JsonPropertyInfo instance has been locked for further modification.

Remarks

The value of Name cannot conflict with that of other JsonPropertyInfo defined in the declaring JsonTypeInfo.

For contracts originating from DefaultJsonTypeInfoResolver or JsonSerializerContext, the value typically reflects the underlying .NET member name, the name derived from PropertyNamingPolicy, or the value specified in JsonPropertyNameAttribute.

Applies to