This is what I want (json array): [{"location":"uk","keyword":"developer","specialization":"asp.net","lat":"28.5654"},"long":78.3265"]`
This is what I tried to get json array:
var list = new List<KeyValuePair<string, string>>();
list.Add(new KeyValuePair<string, string>("Name", query.Name));
list.Add(new KeyValuePair<string, string>("Specialization", query.Specialization));
var json = JsonConvert.SerializeObject(list);
This is the result: [{"Key":"Name","Value":"Sam"},{"Key":"Specialization","Value":"ASP.Net"}]
But I want it like this: [{"Name":"Sam","Specialization":"ASP.Net"}]