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));