using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
你的function...{
// 创建json 对象
JObject msg = new JObject ();
// 设置json对象
msg["msgType"]=msgType;
msg["message"] = message;
// 转为json字符串
string resultMsg = JsonConvert.SerializeObject(msg);
}
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
你的function...{
// 创建json 对象
JObject msg = new JObject ();
// 设置json对象
msg["msgType"]=msgType;
msg["message"] = message;
// 转为json字符串
string resultMsg = JsonConvert.SerializeObject(msg);
}