public static async Task <List <Albums> > parseFromJSON() { var data = await JsonRequests.request("albums"); var json_serializer = new JavaScriptSerializer(); var routes_list = json_serializer.Deserialize <List <Albums> >(data); return(routes_list); }
public static async Task <List <Comments> > parseFromJSON(int?photoId) { var data = await JsonRequests.request("comments"); var json_serializer = new JavaScriptSerializer(); var routes_list = json_serializer.Deserialize <List <Comments> >(data); return(routes_list.Where(c => c.postId == photoId).ToList()); }
public static async Task <List <Photos> > parseFromJSON(int?albumId) { var data = await JsonRequests.request("photos"); var json_serializer = new JavaScriptSerializer(); var routes_list = json_serializer.Deserialize <List <Photos> >(data); return(routes_list.Where(a => a.albumId == albumId).ToList()); }