summaryrefslogtreecommitdiffstats
path: root/test/json101.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:37 +0000
commitde1caa20c41f730e54fb6974ba7821fe48816e40 (patch)
tree4702bdab12e2b6f51bef05af9f8d8854d2e1b7e8 /test/json101.test
parentAdding upstream version 3.45.1. (diff)
downloadsqlite3-de1caa20c41f730e54fb6974ba7821fe48816e40.tar.xz
sqlite3-de1caa20c41f730e54fb6974ba7821fe48816e40.zip
Adding upstream version 3.45.2.upstream/3.45.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--test/json101.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/json101.test b/test/json101.test
index bae68e7..3963ffb 100644
--- a/test/json101.test
+++ b/test/json101.test
@@ -378,6 +378,20 @@ do_execsql_test json101-5.8 {
WHERE jx.value<>jx.atom AND type NOT IN ('array','object');
} {}
+# 2024-02-16 https://sqlite.org/forum/forumpost/ecb94cd210
+# Regression in json_tree()/json_each(). The value column
+# should have the "J" subtype if the value is an array or
+# object.
+#
+do_execsql_test json101-5.10 {
+ SELECT json_insert('{}','$.a',value) FROM json_tree('[1,2,3]') WHERE atom IS NULL;
+} {{{"a":[1,2,3]}}}
+# ^^^^^^^--- In double-quotes, a string literal, prior to bug fix
+
+do_execsql_test json101-5.11 {
+ SELECT json_insert('{}','$.a',value) FROM json_tree('"[1,2,3]"');
+} {{{"a":"[1,2,3]"}}}
+
do_execsql_test json101-6.1 {
SELECT json_valid('{"a":55,"b":72,}');
} {0}