jshn: read and write 64-bit integers
authorChristian Beier <dontmind@freeshell.org>
Sat, 21 Oct 2017 23:42:29 +0000 (01:42 +0200)
committerJohn Crispin <john@phrozen.org>
Mon, 6 Nov 2017 09:05:42 +0000 (10:05 +0100)
This allows for reading in and writing out bigger JSON Numbers.

Following test script (that fails to print correct values _without_ this
commit) verifies the functionality (tested on x86-64 as well as on ar71xx):

---snip---
# assumes you built jshn and sourced jshn.sh
echo testing reading-in JSON
SHELL_BIGNUM=12147483647
json_init
json_load "{ \"bignum\": $SHELL_BIGNUM }"
json_get_var BIGNUM bignum
echo jshn bignum: $BIGNUM
echo shll bignum: $SHELL_BIGNUM
echo testing writing-out JSON
json_init
json_add_int bigint $SHELL_BIGNUM
json_dump
--snap---

Signed-off-by: Christian Beier <dontmind@freeshell.org>

No differences found