whenever i try to serialize the dictionary i get the exception:
System.ArgumentException: Type
\'System.Collections.Generic.Dictionary`2[[Foo.DictionarySerializ
I’ve created JavaScriptSerializer extension DeserializeDictionary- see http://geekswithblogs.net/mnf/archive/2011/06/03/javascriptserializer-extension-deserializedictionarytkey-tvalue.aspx
public static Dictionary DeserializeDictionary(this JavaScriptSerializer jss, string jsonText)
{
var dictWithStringKey = jss.Deserialize>(jsonText);
var dict=dictWithStringKey.ToDictionary(de => jss.ConvertToType(de.Key),de => de.Value);
return dict;
}