JsonSerializerOptions.PropertyNamingPolicy プロパティ

定義

オブジェクトのプロパティ名を別の形式 (キャメルケースなど) に変換したり、プロパティ名を変更しない null に使用するポリシーを指定する値を取得または設定します。

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

プロパティ値

プロパティの名前付けポリシー、またはプロパティ名を変更せずに残す null

注釈

結果のプロパティ名は、逆シリアル化中に JSON ペイロードと一致することが想定され、シリアル化中にプロパティ名を書き込むときに使用されます。

ポリシーは、 JsonPropertyNameAttribute が適用されているプロパティには使用されません。

詳細については、「 System.Text.Json を使用してプロパティの名前と値をカスタマイズする方法」を参照してください

適用対象