<PackageReference Include="newtonsoft.json" Version="3.5.8" />

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 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 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.