Closed louisatome closed 6 years ago
OK after some digging, it seems that the bug is linked to the code : https://github.com/rhomobile/rhodes/blob/e07a94be4606dfbcd5ff1aaab30c3b3f41955d9b/platform/shared/json.new/RJSONTokener.c#L86 It converts the long to an int32 but the value is over the max limit so it returns the INT32_MAX here : https://github.com/rhomobile/rhodes/blob/e07a94be4606dfbcd5ff1aaab30c3b3f41955d9b/platform/shared/json.new/json_object.c#L648
I've try to replace the json_object_get_int
to json_object_get_int64
and it seems to work for my example. But i don't know if that's the proper way to fix it...
Thanks @louisatome we'll try to fix it shortly
I've got a problem with the JSON parsing in rhodes. When I try to parse a JSON string with long integer, the result is incorrect :
I use rhodes version 6.0.55 on android device. Any idea ?