Wrapped的返回值取值

it2022-06-19  75

Bared

 

Wrapped

 

 

using Newtonsoft.Json; using Newtonsoft.Json.Linq; string str = JsonConvert.SerializeObject(student); StringContent content = new StringContent(str, Encoding.UTF8, "application/json"); HttpClient client = new HttpClient(); var result =await client.PostAsync(url + "PostModel", content); var r= result.Content.ReadAsStringAsync().Result; JObject jObject = JObject.Parse(r); string name = jObject["name"].ToString();

通过JObject,采用键值对的方式取出结果

转载于:https://www.cnblogs.com/Lulus/p/7877662.html


最新回复(0)