C# Json对象数组复杂JObject 序列化
tatic void Main(string[] args) { //先反序列化看看 string json = "{\"name\": true,\"age\": \"success\",\"hobby\": [{\"obj1\": \"6\",\"obj2\": \"7\",\"obj3\": \"10\"}, {\"obj1\": \"6\",\"obj2\": \"7\",\"obj3\": \"10\"}]}"; var q = JsonConvert.DeserializeObject<dynamic>(json); Console.WriteLine(q.name); //只反序列化hobby为List<Test> JObject jobj = JObject.Parse(json); string Data = jobj["hobby"].ToString(); var v = JsonConvert.DeserializeObject<List<Test>>(Data); Console.WriteLine(v[0].obj2); Console.ReadLine(); } public class Test { public string obj1 { get; set; } public string obj2 { get; set; } public string obj3 { get; set; } }