var jsonSerializer = new JsonSerializer();
string mStr1 = "[{\"name\":\"李四\",\"age\":22,\"classroom\":\"102\"}]";
//这是转为实体集合
List<Student> students = JsonConvert.DeserializeObject<List<Student>>(mStr1);
//这是转为单个实体
mStr1 = "{\"name\":\"李四\",\"age\":22,\"classroom\":\"102\"}";
var student = JsonConvert.DeserializeObject<Student>(mStr1);
public class Student
{
/// <summary>
/// 姓名
/// </summary>
public string Name { get; set; }
/// <summary>
/// 年龄
/// </summary>
public int Age { get; set; }
/// <summary>
/// 班级
/// </summary>
public string Classroom { get; set; }
}