use of json property in c# code example
Example 1: json property C#
public class Videogame
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("release_date")]
public DateTime ReleaseDate { get; set; }
}
Example 2: c# json serialize
string jsonString = JsonSerializer.Serialize(weatherForecast);