JsonPropertyInfo.Name Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.