<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

JsonPropertyAttribute

public sealed class JsonPropertyAttribute : Attribute
Instructs the JsonSerializer to always serialize the member with the specified name.

Gets or sets the default value handling used when serializing this property.

public bool IsReference { get; set; }

Gets or sets whether this property's value is serialized as a reference.

public object[] ItemConverterParameters { get; set; }

The parameter list to use when constructing the JsonConverter described by ItemConverterType. If null, the default constructor is used. When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, order, and type of these parameters.

public Type ItemConverterType { get; set; }

Gets or sets the JsonConverter type used when serializing the property's collection items.

public bool ItemIsReference { get; set; }

Gets or sets whether this property's collection items are serialized as a reference.

Gets or sets the reference loop handling used when serializing the property's collection items.

Gets or sets the type name handling used when serializing the property's collection items.

public object[] NamingStrategyParameters { get; set; }

The parameter list to use when constructing the NamingStrategy described by NamingStrategyType. If null, the default constructor is used. When non-null, there must be a constructor defined in the NamingStrategy that exactly matches the number, order, and type of these parameters.

public Type NamingStrategyType { get; set; }

Gets or sets the Type of the NamingStrategy.

public NullValueHandling NullValueHandling { get; set; }

Gets or sets the null value handling used when serializing this property.

Gets or sets the object creation handling used when deserializing this property.

public int Order { get; set; }

Gets or sets the order of serialization of a member.

public string PropertyName { get; set; }

Gets or sets the name of the property.

Gets or sets the reference loop handling used when serializing this property.

public Required Required { get; set; }

Gets or sets a value indicating whether this property is required.

public TypeNameHandling TypeNameHandling { get; set; }

Gets or sets the type name handling used when serializing this property.

Initializes a new instance of the JsonPropertyAttribute class.

public JsonPropertyAttribute(string propertyName)

Initializes a new instance of the JsonPropertyAttribute class with the specified name.