c# 自动构造json 字符串

JavaScriptSerializer jss =new JavaScriptSerializer();
        context.Response.ContentType
="text/plain";
        Dictionary
<string, string> drow =new Dictionary<string, string>();
        drow.Add(
"name", "Wang");
        drow.Add(
"age", "24");
        context.Response.Write(jss.Serialize(drow));  

原文地址:https://www.cnblogs.com/zhwl/p/2812517.html