How can I prevent jq from truncating long decimal values?
For example:
echo '18302628978110292481' | jq .
result: 18302628978110292000
How can I prevent jq from truncating long decimal values?
For example:
echo '18302628978110292481' | jq .
result: 18302628978110292000
Javascript does not support such big numbers and so does jq
. The integer size is 2^53
. Check this
To make it work, you'll need to treat them as strings:
echo '"18302628978110292481"' | jq .
# Prints "18302628978110292481"