6 ms·
For whatever it's worth, on a somewhat-current Linux Mint, with the test from https://github.com/stedolan/jq/issues/1387 https://github.com/stedolan/jq/issues/1
by tom_mellior 5y ago
For whatever it's worth, on a somewhat-current Linux Mint, with the test from https://github.com/stedolan/jq/issues/1387 https://github.com/stedolan/jq/issues/1387:
System jq:
$ jq --version
jq-1.6
$ echo '{"number":288230376151711744}' | jq '.number'
288230376151711740
Fresh compile from source according to the build instructions at https://github.com/stedolan/jq https://github.com/stedolan/jq:
$ ./configure --with-oniguruma=builtin && make -j8
$ ./jq --version
jq-1.6-137-gd18b2d0-dirty
$ echo '{"number":288230376151711744}' | ./jq '.number'
288230376151711744
Alternatively:
$ ./configure --with-oniguruma=builtin --enable-decnum=no && make -j8
$ echo '{"number":288230376151711744}' | ./jq '.number'
288230376151711740
So the basic bug is fixed, jq has included a bignum library for > 2 years. I don't know if Mint (and thus presumably Ubuntu, and thus possibly Debian) includes an older version of jq or sets nonstandard user-unfriendly flags on purpose, but I'm somewhat underwhelmed in either case.