i would want to deserialize the json object. But for "Email", there are brackets outside of it. In Account class, it does not allow to put "[Email]" but only "Email". Anyone could help on this? thanks.
Class:
public class Account
{
public string Email { get; set; }
public bool Active { get; set; }
public DateTime CreatedDate { get; set; }
}
The JSON:
{
'[Email]': 'james@example.com',
'Active': true,
'CreatedDate': '2013-01-20T00:00:00Z',
}
How I deserialize:
Account account = JsonConvert.DeserializeObject<Account>(json);
Console.WriteLine(account.Email);