Guest User

Untitled

a guest
Oct 22nd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. string json = @"{
  2. 'href': '/account/login.aspx',
  3. 'target': '_blank'
  4. }";
  5.  
  6. Dictionary<string, string> htmlAttributes = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
  7.  
  8. Console.WriteLine(htmlAttributes["href"]);
  9. // /account/login.aspx
  10.  
  11. Console.WriteLine(htmlAttributes["target"]);
  12. // _blank
Add Comment
Please, Sign In to add comment