后台 返回序列化的 JSon
string msg = context.Request["msg"];
JavaScriptSerializer js = new JavaScriptSerializer();
Dictionary<string, string> dic = new Dictionary<string, string>()
{
{"Time1", "2015.11.251111" }
};
dic.Add("Time", "2015.11.25");
dic.Add("Data", "2013.11.10");
string jsonstr = js.Serialize(new
{
Url = msg,
People = new
{
Name = "大头",
Age = "19"
},
Dic = dic
});
HttpContext.Current.Response.Write(jsonstr);
浙公网安备 33010602011771号