先要引用在程序集 System.Web.Extensions.dll 的类库,在类中 using System.Web.Script.Serialization 命名空间. 1.定义一个强类型的类(model): [Serializable] public class Person { public int Age { get; set; } public string Name { get; set; } } 2.将对象 序列化 成json字符串方法 #region 将对象 序列化 成json…