I tried:
NameValueCollection Data = new NameValueCollection(); Data.Add(\"foo\",\"baa\"); string json = new JavaScriptSerializer().Serialize(Data);
If your dictionary is not intended to contain many entries, you can use the class: System.Collections.Specialized.ListDictionary
System.Collections.Specialized.ListDictionary