this one? im not a computer engineer but programs have their own way to store datas and numbers
0.56 isnt an INT value but a FLOAT
( float values are decimal numbers, like 1.5, 8.9, 0.78)
and these are not the same thing, and are stored differently
in short, dont worry, this is just a way roblox handles decimals
cool right? the negative effect is that lua is a high level language, meaning that this eats alot of information (ram), to make the language easy to understand, but lags
this is an useless information for roblox but is cool to know
The issue is due to how computers store decimal numbers. When you decode JSON, small differences can happen because of the way floating-point numbers are represented. This is normal and happens because 0.56 isn’t stored exactly as 0.56 in memory. It’s just how computers handle decimal numbers.
I don’t think its a problem with JSONDecode but just a problem with how Roblox prints numbers. The classic 0.2 + 0.1 for example, if printed with print(0.2 + 0.1)
would return 0.300000000000000004
The exact same issue happens with the javascript engine in your browser. console.log(0.2 + 0.1) also doesn’t correct the floating point number.