using (System.IO.StreamReader file = System.IO.File.OpenText(pathForSaving)) { using (JsonTextReader reader = new JsonTextReader(file)) { JArray array = (JArray)JToken.ReadFrom(reader); List<BelongingTo> belongingTos = array.ToObject<List<BelongingTo>>(); return belongingTos; } }
测试json文件为json数组