↧
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 ArticleAnswer 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 ArticleHow 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