Newtonsoft.Json是一个比较流行的序列化JSON的dll 感觉挺方便的
1.序列化
stuList 为泛型对象 content接收返回的json字符串;
2反序列化
userName 为接收 AJAX异步传输的json字符串
1.序列化
string content=JavaScriptConvert.SerializeObject(stuList);
stuList 为泛型对象 content接收返回的json字符串;
2反序列化
string userName = context.Request.QueryString["para"].Trim();
List<Student> studentList= JavaScriptConvert.DeserializeObject<List<Student>>(userName);
userName 为接收 AJAX异步传输的json字符串