aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/json1.c
diff options
context:
space:
mode:
authordrh <>2022-01-07 17:26:40 +0000
committerdrh <>2022-01-07 17:26:40 +0000
commita3f51d7b3e7cd531e33779bcb7fec8f259c99cc6 (patch)
tree4a93d0e82e22f28c5a2d18bbaa9989021d321de3 /ext/misc/json1.c
parent9956c18a814de7928821fb446249c692c9e64df4 (diff)
downloadsqlite-a3f51d7b3e7cd531e33779bcb7fec8f259c99cc6.tar.gz
sqlite-a3f51d7b3e7cd531e33779bcb7fec8f259c99cc6.zip
Reverse the meaningn of -> and ->>. ->> raises an error on invalid JSON
but -> does not. This allows ->> to behave the same as PG and MySQL. FossilOrigin-Name: 85f8170555ee0d4d28cb7e120a7062e9f64c331a936fdfa29fc0e67224eea7c6
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r--ext/misc/json1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c
index e35d4ed57..86a486c21 100644
--- a/ext/misc/json1.c
+++ b/ext/misc/json1.c
@@ -2691,8 +2691,8 @@ int sqlite3Json1Init(sqlite3 *db){
{ "json_array_length", 2, 0, jsonArrayLengthFunc },
{ "json_extract", -1, 0, jsonExtractFunc },
{ "json_nextract", -1, 1, jsonExtractFunc },
- { "->", 2, 2, jsonExtractFunc },
- { "->>", 2, 3, jsonExtractFunc },
+ { "->", 2, 3, jsonExtractFunc },
+ { "->>", 2, 2, jsonExtractFunc },
{ "json_insert", -1, 0, jsonSetFunc },
{ "json_ntype", 1, 1, jsonTypeFunc },
{ "json_object", -1, 0, jsonObjectFunc },