Feb 24, 2012, 9:37 AM
JSON Serialize lost properties
Hi all,
I have an problem when serialize an object. JSON.Serialize<Type>(obj) return an incomplete object.
Example:
Thx in advanced.
I have an problem when serialize an object. JSON.Serialize<Type>(obj) return an incomplete object.
Example:
public class Class1
{
public Class2 Obj2;
public Class3 Obj3;
}
public class Class2
{
public string Name;
}
public class Class3
{
public string Name;
public Class4 Obj4;
}
public class Class4
{
public string Name;
}
var lst = new List<Class1>();
lst.Add(new Class1());
string str = JSON.Serialize(lst);
In this example i lost Obj2 and Obj3.Thx in advanced.