json解析:
JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer();
ArrayList arrayList = javaScriptSerializer.Deserialize<ArrayList>(res);
return arrayList;
得到返回的ArrayList
如果json数组为多维,arraylist为ArrayList的集合,可以这样解析为string:
for(int i = 0;i < arraylist.Count;i++)
{
ArrayList son = (ArrayList)arraylist[i]; //将内部ArrayList对象转换为ArrayList
for(int j = 0;j < son.Count;j++)
{ MessageBox.Show((string)son[0]); }}