JsonPropertyNameAttribute Classe

Definizione

Specifica il nome della proprietà presente nel codice JSON durante la serializzazione e la deserializzazione.

public ref class JsonPropertyNameAttribute sealed : System::Text::Json::Serialization::JsonAttribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false)]
public sealed class JsonPropertyNameAttribute : System.Text.Json.Serialization.JsonAttribute
[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false)]
public sealed class JsonPropertyNameAttribute : System.Text.Json.Serialization.JsonAttribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false)>]
type JsonPropertyNameAttribute = class
    inherit JsonAttribute
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false)>]
type JsonPropertyNameAttribute = class
    inherit JsonAttribute
Public NotInheritable Class JsonPropertyNameAttribute
Inherits JsonAttribute
Ereditarietà
JsonPropertyNameAttribute
Attributi

Commenti

Il nome della proprietà specificato esegue l'override di qualsiasi criterio di denominazione specificato da JsonNamingPolicy.

Per altre informazioni, vedere Personalizzare i singoli nomi di proprietà.

Costruttori

JsonPropertyNameAttribute(String)

Inizializza una nuova istanza di JsonPropertyNameAttribute con il nome di proprietà specificato.

Proprietà

Name

Ottiene il nome della proprietà.

TypeId

Quando è implementata in una classe derivata, ottiene un identificatore univoco della classe Attribute.

(Ereditato da Attribute)

Metodi

Equals(Object)

Restituisce un valore che indica se questa istanza è uguale a un oggetto specificato.

(Ereditato da Attribute)
GetHashCode()

Restituisce il codice hash per l'istanza.

(Ereditato da Attribute)
GetType()

Ottiene l'oggetto Type dell'istanza corrente.

(Ereditato da Object)
IsDefaultAttribute()

In caso di override in una classe derivata, indica se il valore di questa istanza è il valore predefinito per la classe derivata.

(Ereditato da Attribute)
Match(Object)

Quando è sottoposto a override in una classe derivata, restituisce un valore che indica se questa istanza equivale a un oggetto specificato.

(Ereditato da Attribute)
MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.

(Ereditato da Object)
ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.

(Ereditato da Object)

Si applica a