Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string json = Helper.CachedRequest("boards.json");
- JavaScriptSerializer s = new JavaScriptSerializer();
- Dictionary<string, object> mob = s.DeserializeObject(json) as Dictionary<string, object>;
- List<Board> b = new List<Board>();
- foreach (Dictionary<string, object> item in mob["boards"] as object[])
- {
- b.Add(new Board()
- {
- Id = item["board"] as string,
- Title = item["title"] as string,
- Worksafe = Helper.IntToBool((int)item["ws_board"]),
- PostsPerPage = (int)item["per_page"],
- Pages = (int)item["pages"]
- });
- }
- return b.ToArray();
Advertisement
Add Comment
Please, Sign In to add comment