json反序列
json = json.Trim();if (json != '[')
json = "[" + json;
if (json != ']')
json = json + "]";
JavaScriptSerializer jss = new JavaScriptSerializer();
ArrayList arrList = jss.Deserialize<ArrayList>(json);
if (arrList.Count > 0)
{
foreach (Dictionary<string, object> arr in arrList)
{
foreach (string key in arr.Keys)
{
//key就是属性
//arr就是对应的属性值
}
}
}
页:
[1]