Jsonencode() reducing precision of floats

I’m sending an array of an array of floats using jsonencode(). It looks like the precision of floats is being limited to 5 or 6 digits by the function. Is there a way to increase precision of the sent values, or do values have to be sent as strings to maintain precision?

you are limited to 32bit representation.

you could consider separating the integer component from the fractional part and send them as separate values in a tuple.

eg
[…,12345.6789876,…] becomes […,[12345,0.6789876],…]

As coverdriven says, all Squirrel floats are 32-bit (IEEE single precision); it’s not jsonencode that’s limiting it.

Peter

Thanks, sending the integer and fractional parts separately works nicely