Quantcast
Channel: How can I deserialize JSON to a simple Dictionary in ASP.NET? - Stack Overflow
Viewing all articles
Browse latest Browse all 23

Answer by JP Richardson for How can I deserialize JSON to a simple Dictionary in ASP.NET?

$
0
0

For those searching the internet and stumbling upon this post, I wrote a blog post on how to use the JavaScriptSerializer class.

Read more...http://procbits.com/2011/04/21/quick-json-serializationdeserialization-in-c/

Here is an example:

var json = "{\"id\":\"13\", \"value\": true}";var jss = new JavaScriptSerializer();var table = jss.Deserialize<dynamic>(json);Console.WriteLine(table["id"]);Console.WriteLine(table["value"]);

Viewing all articles
Browse latest Browse all 23

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>