使用Json.Net,您可以执行以下操作:
public async TaskGetUserMenu() { string result = string.Empty; using (HttpClient client = new HttpClient()) { client.BaseAddress = new Uri(url); HttpResponseMessage response = await client.GetAsync(url); if (response.IsSuccessStatusCode) { result = await response.Content.ReadAsStringAsync(); } } return Json(Newtonsoft.Json.JsonConvert.DeserializeObject (result)); }