public async void SetDetailView(string user_detail = null) { HttpClient client = new HttpClient(); var response = await client.GetStringAsync("https://jsonplaceholder.typicode.com/todos/"+user_detail); Products result = JsonConvert.DeserializeObject<Products>(response); Console.WriteLine(result.title); }
Where products is the json2csharp method.
public class Product { public string Email { get; set; } public bool Active { get; set; } public DateTime CreatedDate { get; set; } public IList<string> Roles { get; set; } }