Reputation: 747
So I have this class:
public class Foo
{
public string EmailAddress { get; set; }
}
I need to make it email_address before i add it in the body of my request
I tried:
[SerializeAs(Name = "email_address")]
public string EmailAddress { get; set; }
but it doesn't work. any thoughts about this?
Upvotes: 1
Views: 1095
Reputation: 747
Fixed , I used
[JsonProperty(PropertyName = "email_address")]
public string EmailAddress { get; set; }
Upvotes: 7