60
30
public static System.Collections.ArrayList getQXZXJSON(string lineZ)
{
System.Collections.ArrayList rowList = new System.Collections.ArrayList();
JavaScriptObject javascript = (JavaScriptObject)JavaScriptConvert.DeserializeObject(lineZ);
System.Collections.ArrayList colList = new System.Collections.ArrayList();
if (javascript[“queryBingingPlayer”].GetType().ToString() == “Newtonsoft.Json.JavaScriptArray”)
{
JavaScriptArray json = (JavaScriptArray)javascript[“queryBingingPlayer”];
foreach (JavaScriptObject obj in json)
{
foreach (object obj1 in obj.Keys)
{
colList.Add(obj1.ToString());
colList.Add(obj[obj1.ToString()]);
}
}
}
else
{
JavaScriptObject json = (JavaScriptObject)javascript[“queryBingingPlayer”];
foreach (object obj in json.Keys)
{
colList.Add(obj.ToString());
string index =Convert.ToString( json[obj.ToString()]);
colList.Add(index);
//colList.Add(json[obj.ToString()]);
}
}
rowList.Add(colList);
return rowList;
}
10
假如要存BYTE[]就用Encoding.UTF8.GetBytes()来转换成字节数据,然后存数据库。