Auto-implemented properties C# 3.0 generate a hidden backing field.
C# 7.3 allows you to annotate the hidden backing field with attributes.
Code
C#
class Location
{
[field:JsonIgnore]
public string Name { get; set; }
public decimal Latitude { get; set; }
public decimal Longitude { get; set; }
}
C#
class Location
{
[JsonIgnore]
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
public decimal Latitude { get; set; }
public decimal Longitude { get; set; }
}