public void TestSimpleJSON() { var obj = new SimpleJSON.JSONObject(); obj["ts"] = (ulong)1584652993123L; Assert.AreEqual("{\"ts\":1584652993123}", obj.ToString()); }
The problem seems like C# is picking the float implicit operator and data is being truncated in this cast.
This test fails without the change.
public void TestSimpleJSON() { var obj = new SimpleJSON.JSONObject(); obj["ts"] = (ulong)1584652993123L; Assert.AreEqual("{\"ts\":1584652993123}", obj.ToString()); }
The problem seems like C# is picking the float implicit operator and data is being truncated in this cast.