diff options
author | drh <> | 2023-03-17 20:31:24 +0000 |
---|---|---|
committer | drh <> | 2023-03-17 20:31:24 +0000 |
commit | 667b5cc985d68f0f63e67a2888d0ec36c83a1688 (patch) | |
tree | dedadd04730861ccd0ff89187756aceeedb7d2c5 /src/json.c | |
parent | f204be8098faa2182822baf748908da4371cad8d (diff) | |
download | sqlite-667b5cc985d68f0f63e67a2888d0ec36c83a1688.tar.gz sqlite-667b5cc985d68f0f63e67a2888d0ec36c83a1688.zip |
Fix json rendering so that it shows positive and negative infinity as
9.0e+999 and -9.0e+999 respectively.
FossilOrigin-Name: efce4690a52592c4f5fc7d023eebe771b0e615bb03c0fe203493f853b28e8f85
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/json.c b/src/json.c index 67448421b..9783a3898 100644 --- a/src/json.c +++ b/src/json.c @@ -307,8 +307,11 @@ static void jsonAppendValue( jsonAppendRaw(p, "null", 4); break; } - case SQLITE_INTEGER: case SQLITE_FLOAT: { + jsonPrintf(100, p, "%!0.15g", sqlite3_value_double(pValue)); + break; + } + case SQLITE_INTEGER: { const char *z = (const char*)sqlite3_value_text(pValue); u32 n = (u32)sqlite3_value_bytes(pValue); jsonAppendRaw(p, z, n); |