You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A web service I need to use is returning the following in its JSON:
"Id":1618065507111835497
But when using this Lua library to decode it, the result is losing precision as "Id" is returned as:
1.6080655071118e+18
In this case I can't change what the webservice is providing. I'm quite happy referring the data as a string - it's just an id value.
I am limited to only using Lua 5.1.4.
Any help appreciated (e.g. pass back numbers that can't be correctly converted as strings?).
Thanks,
Rob
The text was updated successfully, but these errors were encountered:
I think the problem is that Lua 5.1.4 does not include 64 bit integers, this was added in Lua 5.3.
When I try and perform the same decode example on Lua 5.1.4 I lose precision.
I'm restricted to using Lua 5.1.4 as it is embedded in the host application.
A web service I need to use is returning the following in its JSON:
"Id":1618065507111835497
But when using this Lua library to decode it, the result is losing precision as "Id" is returned as:
1.6080655071118e+18
In this case I can't change what the webservice is providing. I'm quite happy referring the data as a string - it's just an id value.
I am limited to only using Lua 5.1.4.
Any help appreciated (e.g. pass back numbers that can't be correctly converted as strings?).
Thanks,
Rob
The text was updated successfully, but these errors were encountered: