Implement json_array

This commit is contained in:
Kacper Madej
2024-12-18 02:11:25 +01:00
parent 94d69c5a4e
commit 19ae42dfa3
9 changed files with 717 additions and 503 deletions

12
testing/json.test Normal file → Executable file
View File

@@ -55,3 +55,15 @@ do_execsql_test json5-multi-comment {
SELECT json(' /* abc */ { /*def*/ aaa /* xyz */ : // to the end of line
123 /* xyz */ , /* 123 */ }')
} {{{"aaa":123}}}
do_execsql_test json_array_str {
SELECT json_array('a')
} {{["a"]}}
do_execsql_test json_array_not_json {
SELECT json_array('{"a":1}');
} {{["{\"a\":1}"]}}
do_execsql_test json_array_json {
SELECT json_array(json('{"a":1}'));
} {{[{"a":1}]}}