【发布时间】:2010-03-20 11:01:11
【问题描述】:
我有一个人员对象列表,我想发送这些对象以响应 jquery 的 ajax 请求。我想将列表发送为 JSON 格式。名单如下——
List<Person> PersonList = new List<Person>();
Person X = new Person("X", 23, "This is X");
Person Y = new Person("Y", 24, "This is Y");
PersonList.Add(X);
PersonList.Add(Y);
如何将此PersonList 列表转换为 JSON?
【问题讨论】: