I have an array of dictionaries that I\'ve created in javascript. After serializing to json I get the following string :
\"[{\\\"key\\\":\\\"60236\\\",\\\"va
what i suggest is for try to see what actually your json represent. You can create a class here on Json2CSharp and the use this class/List of this class (depend on whether your json is in the form of array or simple class object).
Just pass type to JsonConvert.DeserializeObject class type part. for example
var output = JsonConvert.DeserializeObject>(json);
In your case is it just an array of Temp class
public class Temp
{
public string key { get; set; }
public string value { get; set; }
}
Sp all you need is :-
var output = JsonConvert.DeserializeObject>(json);
The you can convert this list to dictionary as suggested in other answer:-
var dictionary = output.ToDictionary(x => x.Key, y => y.Value);
This always help me out. Hope it help you too.