How to serialize Dictionary to json object
var dict = new Dictionary<string, string>()
{
{"Username", "{Username}"},
{"FirstName", "{FirstName}"},
{"LastName", "{LastName}"},
{"AccountMeta[0].MetaKey", "Pincode"},
{"AccountMeta[0].MetaValue", "150000"},
};
public class Account {
public string Username {get;set;}
public string FirstName{get;set;}
public string LastName {get;set;}
public List<AccountMeta> AccountMeta {get;set;}
}
And Objects:
public class AccountMeta{
public string MetaKey {get;set;}
public string MetaValue{get;set;}
}