1、使用NuGet安装Newtonsoft.Json依赖
2、引入Newtonsoft.Json命名空间
3、使用
3.1、首先定义一个json对应的实体类
public class student
{
public int id { get; set; }
public string name { get; set;
}
3.2、转化
static void Main(string[] args)
{
string jsonStudent = "[{"id":152,"name":"789"},{"id":888,"name":"789"}]";
List list= JsonConvert.DeserializeObject>(jsonStudent);
Console.WriteLine(list[1].id);
}



