JsonPropertyInfo.Name 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定序列化時使用的 JSON 屬性名稱。
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
屬性值
例外狀況
value 是 null。
該 JsonPropertyInfo 實例已被鎖定,無法進一步修改。
備註
的Name值不能與宣告JsonTypeInfo中定義的其他JsonPropertyInfo值衝突。
對於來自 DefaultJsonTypeInfoResolver 或 JsonSerializerContext 的合約,價值通常反映底層.NET成員名稱、源自 PropertyNamingPolicy 的名稱,或 JsonPropertyNameAttribute 中指定的價值。