Clone
Xikui Wang <xkkwww@gmail.com>
committed
on 02 Feb 19
[ASTERIXDB-2514] Fix BigInt display in formatted JSON
- user model changes: no
- storage format changes: no
- interface changes: no

Javascr… Show more
[ASTERIXDB-2514] Fix BigInt display in formatted JSON

- user model changes: no

- storage format changes: no

- interface changes: no

Javascript treats all numbers as doubles. This causes large BigInt

values cannot be displayed properly in the formatted JSON option, and

the lower digits are replaced with "0". In this patch, we cast the

numbers into strings with special characters, and cast those strings

back after they are parsed by the JSON parser. Also, to make sure future

new data types can be displayed properly, the default JSON display is

set to "literal".

Change-Id: I1bbef349efba0da24d01afb1cb17b4f7d5b7f261

Reviewed-on: https://asterix-gerrit.ics.uci.edu/3142

Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Michael Blow <mblow@apache.org>

Show less