System.Web.Extensions.dll中类JavaScriptSerializer可以帮助我们把C#对象转化为JSON字符串. 有一个Person类 public class Person { private string name; public string Name { get { return name; } set { name = value; } } private int age; public int Age { get { return age; } set {…