Advertisement
Guest User

Untitled

a guest
May 7th, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. // сгенерировано студией через Edit/Paste Special/Paste JSON as Classes
  2. public class Rootobject
  3. {
  4. public Response response { get; set; }
  5. }
  6.  
  7. public class Response
  8. {
  9. public int game_count { get; set; }
  10. public Game[] games { get; set; }
  11. }
  12.  
  13. public class Game
  14. {
  15. public int appid { get; set; }
  16. public int playtime_forever { get; set; }
  17. }
  18.  
  19. string url = "http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=5DDE73742302BAFF52D2B0D72DED476B&steamid=76561198226175440";
  20. var parsed = JsonConvert.DeserializeObject<Rootobject>(new WebClient().DownloadString(url));
  21.  
  22. HttpContent requestContent = Request.Content;
  23. string jsonContent = requestContent.ReadAsStringAsync().Result;
  24. MYOBJECT contact = JsonConvert.DeserializeObject<MYOBJECT>(jsonContent);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement