JsonSerializerOptions.PropertyNamingPolicy 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 a value that specifies the policy used to convert a property's name on an object to another format, such as camel-casing, or null
to leave property names unchanged.
public:
property System::Text::Json::JsonNamingPolicy ^ PropertyNamingPolicy { System::Text::Json::JsonNamingPolicy ^ get(); void set(System::Text::Json::JsonNamingPolicy ^ value); };
public System.Text.Json.JsonNamingPolicy? PropertyNamingPolicy { get; set; }
public System.Text.Json.JsonNamingPolicy PropertyNamingPolicy { get; set; }
member this.PropertyNamingPolicy : System.Text.Json.JsonNamingPolicy with get, set
Public Property PropertyNamingPolicy As JsonNamingPolicy
Property Value
A property naming policy, or null
to leave property names unchanged.
Remarks
The resulting property name is expected to match the JSON payload during deserialization, and will be used when writing the property name during serialization.
The policy is not used for properties that have a JsonPropertyNameAttribute applied.
For more information, see How to customize property names and values with System.Text.Json.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor