0

I Have a class looks like this :

public class CLassTest
{
    [JsonProperty(PropertyName = "id")]
    public int Id { get; set; }
    [JsonProperty(PropertyName = "user_name")]
    public string UserName { get; set; }
    [JsonProperty(PropertyName = "Name ")]
    public string Name { get; set; }
    [JsonProperty(PropertyName = "family_name")]
    public string FamilyName { get; set; }
    
}

The problem : I want all props as snake case so I use JsonProperty attribute for each prop. is there any attribute to use it on whole class instead of each prop ?

0 Answers0