.net 对json数据进行读取
2021-04-30 05:27
标签:ext file from each nod info text tle object TextReader file = new StringReader(info); JToken data = json["data"]; //var deviceID = details["id"]; .net 对json数据进行读取 标签:ext file from each nod info text tle object 原文地址:https://www.cnblogs.com/wdd812674802/p/12198299.html
using (JsonTextReader reader = new JsonTextReader(file))
{
JObject json = (JObject)JToken.ReadFrom(reader);
//遍历data中所有的课程,取details节点
foreach (JObject node in data)
{
//JObject details = (JObject)node["subject"];
//var title = details["title"];
//var thumb = details["thumb"];
//var xiangqing=details["xiangqing"];
text += "标题:"+node["subject"] + "
" +"公告ID:"+node["notifyId"];
}
}
上一篇:Ajax的使用
下一篇:jQuery——初识jQuery