标签:pts roc ext c# jsp send bsp nod row
引用中 增加 system.web.Extension; 和system.web.services ;
json 转对象
private T scriptDeserialize<T>(string jsonstr)
{
JavaScriptSerializer js = new JavaScriptSerializer();
return js.Deserialize<T>(jsonstr);
}
对象转json
private string getJsonStr(JsonSendPlayback jsplaybcak)
{
JavaScriptSerializer js = new JavaScriptSerializer();
Dictionary<string, string> drow = new Dictionary<string, string>();
drow.Add("videoId", jsplaybcak.VideoId);
drow.Add("mobId", jsplaybcak.MobId);
drow.Add("nodeId", jsplaybcak.NodeId);
drow.Add("highPriority", jsplaybcak.HighPriority.ToString());
drow.Add("overwrite", jsplaybcak.Overwrite.ToString());
drow.Add("profile", jsplaybcak.Profile);
drow.Add("ProcessName", jsplaybcak.ProcessName);
drow.Add("device", jsplaybcak.Device);
return js.Serialize(drow);
}
标签:pts roc ext c# jsp send bsp nod row
原文地址:https://www.cnblogs.com/ssjsk/p/9073102.html