下载地址:http://json.codeplex.com/
static void Main(string[] args)
{
string jsonTest = "[{‘name‘:‘张三‘,‘age‘:20},{‘name‘:‘李四‘,‘age‘:19}]";
var stu = JsonConvert.DeserializeObject<List<Student>>(jsonTest);
string str = JsonConvert.SerializeObject(stu);
}
public class Student
{
public string Name { get; set; }
public int age { get; set; }
}
时间: 2024-10-11 04:20:22