I am trying to serialize a Dictionary to JSON, and get the following exception:
new JavaScriptSerializer().Serialize(mydict)`
Ty
use NewtonSoft.Json instead of JavaScriptSerializer to overcome this problem:
NewtonSoft.Json
JavaScriptSerializer
Ex:
JsonConvert.SerializeObject(mydict);