JavaScriptSerializer deserialize object "collection" as property in object failing
Posted
by bill
on Stack Overflow
See other posts from Stack Overflow
or by bill
Published on 2010-06-02T16:27:35Z
Indexed on
2010/06/02
18:34 UTC
Read the original article
Hit count: 1071
Hi All,
I have a js object structured like:
object.property1 = "some string";
object.property2 = "some string";
object.property3.property1 = "some string";
object.property3.property2 = "some string";
object.property3.property2 = "some string";
i'm using JSON.stringify(object) to pass this with ajax request. When i try to deserialize this using JavaScriptSerializer.Deserialize as a Dictionary i get the following error:
No parameterless constructor defined for type of 'System.String'.
This exact same process is working for regular object with non "collection" properties.. thanks for any help!
© Stack Overflow or respective owner