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

Answer by James Newton-King for How can I deserialize JSON to a simple...

Json.NET does this...string json = @"{""key1"":""value1"",""key2"":""value2""}";var values = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);More examples: Serializing...

View Article


Answer by richardtallent for How can I deserialize JSON to a simple...

Edit: This works, but the accepted answer using Json.NET is much more straightforward. Leaving this one in case someone needs BCL-only code.It’s not supported by the .NET framework out of the box. A...

View Article


How can I deserialize JSON to a simple Dictionary in ASP.NET?

I have a simple key/value list in JSON being sent back to ASP.NET via POST. Example:{ "key1": "value1", "key2": "value2"}I AM NOT TRYING TO DESERIALIZE INTO STRONGLY-TYPED .NET OBJECTSI simply need a...

View Article
Browsing all 23 articles
Browse latest View live


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