UInt currently seems to be serialized as a regular Int:
class Main {
static function main() {
var i:UInt = 0x80000000;
trace(i); // 2147483648
trace((i : Int)); // -2147483648
var data:Data = {i: i};
// outputs {"i": -2147483648}, but should be {"i": 2147483648}
trace(new json2object.JsonWriter<Data>().write(data));
}
}
typedef Data = {
var i:UInt;
}
Support for UInt may need to be hardcoded, considering the abstract allows an implicit to Int.
UInt
currently seems to be serialized as a regularInt
:Support for
UInt
may need to be hardcoded, considering the abstract allows an implicitto Int
.