troubleshooting Question

JavaScriptSerializer deserialize to Dictionary or List

Avatar of flynny
flynnyFlag for United Kingdom of Great Britain and Northern Ireland asked on
7 Comments2 Solutions1865 ViewsLast Modified:
Hi all,

I pass a stringified string across to a webmethod.

From the server side I want to deserialise the string to Dictionary<String, Dictionary<String, String>>

An Example String is;

[["MainLogo",[["top",29],["left",90],["width",458.76666],["height",95]]],["MainLogo2",[["top",19],["left",45],["width",345],["height",546], ["color","blue"]]]]

(The above is from an output server side of the de-serialized ajax pass).

I have tried the following

 JavaScriptSerializer jss = new JavaScriptSerializer();
           //var css = jss.Deserialize<dynamic>(updates);
            var css = jss.Deserialize<Dictionary<String, Dictionary<String, String>>>(updates);


Can anyone tell me what i am doing wrong here please?
Jaime Olivares
Software Architect
Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros