string jsonText = "[{'a':'aaa','b':'bbb','c':'ccc'},{'a':'aaa2','b':'bbb2','c':'ccc2'}]"; JArray ja = (JArray)JsonConvert.DeserializeObject(jsonText); JObject o = (JObject)ja[1]; Console.WriteLine(o["a"]); Console.WriteLine(ja[1]["a"]);
string jsonText = "[{'a':'aaa','b':'bbb','c':'ccc'},{'a':'aaa2','b':'bbb2','c':'ccc2'}]"; JArray ja = (JArray)JsonConvert.DeserializeObject(jsonText); JObject o = (JObject)ja[1]; Console.WriteLine(o["a"]); Console.WriteLine(ja[1]["a"]);
转载于:https://www.cnblogs.com/l25321937/p/3364999.html