2.构造实体对象:
public class ActionParam { ACTIONVALUE { get; set; } public string CONTENT { get; set; } public string DEVID { get; set; } public string DEVNAME { get; set; } public string DEVTYPE { get; set; } public string EVENTTYPE { get; set; } public string GRIDCODE { get; set; } public bool ISAUTO { get; set; } public string MEASURENAME { get; set; } public string MEASURETAG { get; set; } public string STREAMTYPE { get; set; } public string TIMESPAN { get; set; } }3.转化为C#中声明的数据格式:
JavaScriptSerializer js = new JavaScriptSerializer(); //实例化一个能够序列化数据的类 List<ActionParam> listDetail = js.Deserialize<List<ActionParam>>(actionParam);以为json字符串是数组格式,所以js.Deserialize<T>()泛型中使用List<ActionParam>.