public class VKGroupObject
{
public ResponseGroup response { get; set; }
}
public class ResponseGroup
{
public string count { get; set; }
public IList<VKGroupItems> items { get; set; }
}
public class VKGroupItems
{
public string id { get; set; }
public string name { get; set; }
public string screen_name { get; set; }
public string is_admin { get; set; }
public string admin_level { get; set; }
public string photo_50 { get; set; }
}
public List<T> GetData<T>(string json)
{
List<T> group = new List<T>();
group.Add(JsonConvert.DeserializeObject<T>(json));
return group;
}
Uri dataUri = new Uri("ms-appx:///DataModel/TextFile1.txt");
StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(dataUri);
IList<string> localList;
localList = new List<string>();
localList = await FileIO.ReadLinesAsync(file);
for (int i = 0; i < localList.Count; i += 8)
{
commonWidget.Add(new Widget
{
Id = Convert.ToInt32(localList[i]),
Name = localList[i+1],
Bithday = localList[i+2],
Description = localList[i + 4],
ImagePath = localList[i + 3],
Career = localList[i + 5]
});
}