var httpClient = new HttpClient();
var response = await httpClient.GetAsync("URL");
if (response.StatusCode == HttpStatusCode.OK){
var result = response.Content.ReadAsStringAsync().Result;
if (result == "[]")
{
await DisplayAlert("Invalid", "invalid", "Try Again");
}
else
{
var name = JsonConvert.DeserializeObject<List<DemoClass>>(result);
}
}
Asked
Active
Viewed 40 times
0

Derek Brown
- 4,232
- 4
- 27
- 44
-
2You may want to pick a look at *[How do I ask a good question?](https://stackoverflow.com/help/how-to-ask)* and *[What should I do when someone answers my question?](https://stackoverflow.com/help/someone-answers)*. That being said, welcome on [SO](https://stackoverflow.com/). – keepAlive Oct 22 '17 at 00:38
-
1You should post your Json and your model – Alessandro Caliaro Oct 22 '17 at 07:14
-
If your model "DemoClass" is correct and lines up with the JSON object you are receiving, then you can get Id with name.Id; If you mean anything differently, see comment from @Kanak – Joagwa Oct 23 '17 at 01:56