标签:接口 lis 获取 int job nbsp string sts str
string jsonText =
"{‘Total‘:‘0‘,‘Rows‘:[{‘id‘:‘31‘,‘project‘:‘6‘,‘project_name‘:‘一卡通‘,‘name‘:‘接口测试!‘,‘assignedTo‘:‘zhangsan‘,"
+"‘realname‘:‘张三‘,‘estStarted‘:‘2016/11/23‘,‘realStarted‘:‘2000/01/01‘,‘status‘:‘wait‘},"
+ "{‘id‘:‘32‘,‘project‘:‘6‘,‘project_name‘:‘一卡通‘,‘name‘:‘测试服务器调通!‘,‘assignedTo‘:‘lisi‘,"
+"‘realname‘:‘李四‘,‘estStarted‘:‘2016/11/23‘,‘realStarted‘:‘2016/11/23‘,‘status‘:‘wait‘}]}";
JObject json1 = (JObject)JsonConvert.DeserializeObject(jsonText);
JArray array = (JArray)json1["Rows"];
int i = array.Count;
string aa="";
foreach (var jObject in array)
{
//赋值属性
aa = jObject["id"].ToString();//获取字符串中id值
}
标签:接口 lis 获取 int job nbsp string sts str
原文地址:https://www.cnblogs.com/zhang-56840218/p/12870636.html