Long number wrong when display json result as "Pretty Print"
Closed this issue · 4 comments
I have a command that return me a long number in a json record.
Example:
{"items":[{"longnumber":55871516310040211}],"first":{"$ref":"https://myurl/api/gettest"}}
When display as "Pretty, it returns this:
{
"items": [
{
"longnumber": 55871516310040210
}
],
"first": {
"$ref": "https://myurl/api/gettest"
}
}
The last digit of the number return "0" instead of "1".
Seems to be tiny bug.
Thanks to look at this.
KM.
I'm working with Oracle databases and the numbers can be big up to 20 digits.
That sounds like a perfectly valid use case.
Maybe something like https://www.npmjs.com/package/json-bigint can help. I'm going to have a closer look in the next days.
I just uploaded version 4.6.0, which fixes this. JSON formatting is a bit slower now, but that should only be noticeable with a very large JSON string. Definitely worth it, I think.