aboutsummaryrefslogtreecommitdiff
path: root/test/json101.test
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-09-22 00:21:03 +0000
committerdrh <drh@noemail.net>2015-09-22 00:21:03 +0000
commit8cb0c83cce2abc8e0a303877253ca17a19d6017a (patch)
tree56f851d506b045dcf4494dceaa7c18c25835982a /test/json101.test
parent357e42d48fc842fc0974313b3cb5b69bc859bc78 (diff)
downloadsqlite-8cb0c83cce2abc8e0a303877253ca17a19d6017a.tar.gz
sqlite-8cb0c83cce2abc8e0a303877253ca17a19d6017a.zip
Fix json_set() so that it can overwrite a value that was previously overwritten
during the same call. FossilOrigin-Name: 0f16041647993975c316203c7e11f06e27640136
Diffstat (limited to 'test/json101.test')
-rw-r--r--test/json101.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/json101.test b/test/json101.test
index 762e708ec..4f1b7056d 100644
--- a/test/json101.test
+++ b/test/json101.test
@@ -74,6 +74,9 @@ do_execsql_test json1-3.3 {
do_execsql_test json1-3.4 {
SELECT json_type(json_set('{"a":1,"b":2}','$.b',json('{"x":3,"y":4}')),'$.b');
} {object}
+do_execsql_test json1-3.5 {
+ SELECT fullkey, atom, '|' FROM json_tree(json_set('{}','$.x',123,'$.x',456));
+} {{$} {} | {$.x} 456 |}
# Per rfc7159, any JSON value is allowed at the top level, and whitespace
# is permitting before and/or after that value.