mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
The double-to-text conversion renders infinity as 9e999, so that JSON
output is compliant and so that values can be round-tripped. FossilOrigin-Name: b52081d0acd07dc5bdb4951a3e8419866131965260c1e3a4c9b6e673bfe3dfea
This commit is contained in:
@ -885,4 +885,16 @@ do_execsql_test json-19.3 {
|
||||
SELECT * FROM t1;
|
||||
} {}
|
||||
|
||||
# 2023-03-17 positive and negative infinities
|
||||
#
|
||||
do_execsql_test json-20.1 {
|
||||
SELECT json_object('a',2e370,'b',-3e380);
|
||||
} {{{"a":9.0e+999,"b":-9.0e+999}}}
|
||||
do_execsql_test json-20.2 {
|
||||
SELECT json_object('a',2e370,'b',-3e380)->>'a';
|
||||
} Inf
|
||||
do_execsql_test json-20.3 {
|
||||
SELECT json_object('a',2e370,'b',-3e380)->>'b';
|
||||
} {-Inf}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user