HttpClient client = new HttpClient(); client.BaseAddress = new Uri(url); var response = await client.GetAsync(client.BaseAddress); response.EnsureSuccessStatusCode(); var JsonResult = response.Content.ReadAsStringAsync().Result; // I have confirmed that the raw json is in JsonResult. var promotemp = JsonConvert.DeserializeObject<List<DetailsHeader>>(JsonResult); namespace m2m.Model { } public class DetailsHeader { public int autocouponlinkpk { get; set; } public DateTime enddate { get; set; } public string market_descrp { get; set; } public string globallogo { get; set; } public List<PromoDetails> details { get; set; } } public class PromoDetails { public long autocouplinkpage2pk { get; set; } public string image_fullurl { get; set; } public string group_descrp { get; set; } } }and here is the json
{ "autocouponlinkpk": 170, "enddate": "2016-06-30", "market_descrp": "My test", "globallogo": "http://subscriberimages/47/fkpzlkxift-1423092258.jpg", "details": [ { "autocouplinkpage2pk": 82, "image_fullurl": "http://marketImgs/47/xhkppjcxey-1445635420.png", "group_descrp": "This is page 2" }, { "autocouplinkpage2pk": 83, "image_fullurl": "http://marketImgs/47/movjznnosp-1445700931.jpg", "group_descrp": "page 2 of page 2." }, { "autocouplinkpage2pk": 84, "image_fullurl": "http://marketImgs/47/vbzkznsbkg-1445700969.jpg", "group_descrp": "page 3 of page 2" } ] }What am I doing wrong?