Open Frankinstien4444 opened 2 years ago
What do you get?
It deserializes as null.
The following works:
public class ControllerAsset //: AutoGeneratedNetworkDevice
{
public String Firmware { set; get; }
public int? GroupID { set; get; }
}
[Test]
public static void nullabletest()
{
var c = new ControllerAsset { GroupID = 10 };
var s = JSON.ToJSON(c);
Console.WriteLine(s);
var o = JSON.ToObject<ControllerAsset>(s);
Assert.AreEqual(10, o.GroupID);
}
When I use an ?int property the value does save to the file correctly but I'm not able to deserialize the value. Any ideas?
`[Serializable] public class ControllerAsset : AutoGeneratedNetworkDevice {