.

Json.Decode

<code>Ensure your project "<code>properties</code>" is set to
".NET Framework 4"  (not the Client Profile version)</code>

Add a “.Net” reference:
System.Web.Helpers (2.0.0.0) (v4.0.30319)

include your reference:

using System.Web.Helpers;

 

and deserialize:

var dynamicObject = Json.Decode(jsonString);

alternatively, without dynamics, just a dictionary:

var deserializedString = new JavaScriptSerializer().Deserialize<Dictionary<string, Dictionary<string, int>>>(val);
var myVals = deserializedString["mainkey"];

and getting results:

foreach (string key in myVals.Keys)
    Console.WriteLine(key + ": " + myVals[key]);

or use json.net

What's your thoughts on this?

*

Protected by WP Anti Spam