I have an object model that looks like this:
public class MyObjectModel { public int1 {get;set;} public int2 {get;set;} [ScriptIgnore] public int3 {get;set;} }
In my code, I write this:
MyObjectModel TheObject = new MyObjectModel(); TheObject = LoadFromQuery();
When I look at the json string TheObjectInJson, it looks like this:
"{\"int1\":31,\"int2\":5436}"
The serializer adds a backslash to each property. I tried adding and removing the [Serializable] attribute above the class definition, but to no avail.
Any suggestions why this is happening?
Thanks.
source share