JObject json = //获得一个JObject对象
/*
{
"records": [
{
"ID": "ABC",
"OperationPatchID": "1",
"s05055396": "120.93900",
"s05055099": "14.44790",
"s04026131": "Open lot",
"s04020195": "3334",
"s03006029": "2014/7/23 0:00:00",
"s03006045": "BAC"
}
],
"count": 1
} Newtonsoft.Json.Linq.JObject
*/
StringBuilder sb = new StringBuilder("<div>");
JToken record = json["records"][0];
foreach(JProperty jp in record)
{
sb.Append(String.Format(@"<span>{0}</span>:<span>{1}</span>"
,jp.Name
,jp.Value));
}
sb.Append("</div>");
原文:http://blog.csdn.net/yhyhyhy/article/details/51063594?locationNum=13&fps=1