Changeset: 4467f8b0d74a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/4467f8b0d74a
Branch: literal_features
Log Message:

merged with default


diffs (truncated from 1101 to 300 lines):

diff --git a/clients/examples/C/bincopydata.c b/clients/examples/C/bincopydata.c
--- a/clients/examples/C/bincopydata.c
+++ b/clients/examples/C/bincopydata.c
@@ -265,7 +265,7 @@ gen_json(FILE *f, bool byteswap, long nr
                if (i % 100 == 99) {
                        fputc('\x80', f);
                } else {
-                       fprintf(f, "{\"id\": %ld, \"msg\":\n\"int%ld\"}", i, i);
+                       fprintf(f, "{\"id\":%ld,\"msg\":\"int%ld\"}", i, i);
                }
                fputc('\0', f);
        }
diff --git a/monetdb5/ChangeLog.json-storage b/monetdb5/ChangeLog.json-storage
new file mode 100644
--- /dev/null
+++ b/monetdb5/ChangeLog.json-storage
@@ -0,0 +1,10 @@
+# ChangeLog file for monetdb5
+# This file is updated with Maddlog
+
+* Fri Oct 20 2023 Panagiotis Koutsourakis <[email protected]>
+- Change how json is stored in the database: We now normalize json
+  strings after parsing, removing whitespace and eliminating duplicate
+  keys in objects.
+- The function json.filter now properly returns json scalars instead of
+  wrapping them in an array.
+
diff --git a/monetdb5/modules/atoms/Tests/json03.maltest 
b/monetdb5/modules/atoms/Tests/json03.maltest
--- a/monetdb5/modules/atoms/Tests/json03.maltest
+++ b/monetdb5/modules/atoms/Tests/json03.maltest
@@ -65,7 +65,7 @@ js:= calc.json("[{ \"category\": \"refer
 query T rowsort
 io.print(js)
 ----
-"[{ \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": 
\"Sayings of the Century\", \"price\": 8.95 }, { \"category\": \"fiction\", 
\"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99 
}, { \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": 
\"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 8.99 }, { \"category\": 
\"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the 
Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 }, { \"color\": \"red\", 
\"price\": 19.95 }]"
+"[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":\"Sayings of 
the Century\",\"price\":8.95},{\"category\":\"fiction\",\"author\":\"Evelyn 
Waugh\",\"title\":\"Sword of 
Honour\",\"price\":12.99},{\"category\":\"fiction\",\"author\":\"Herman 
Melville\",\"title\":\"Moby 
Dick\",\"isbn\":\"0-553-21311-3\",\"price\":8.99},{\"category\":\"fiction\",\"author\":\"J.
 R. R. Tolkien\",\"title\":\"The Lord of the 
Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99},{\"color\":\"red\",\"price\":19.95}]"
 
 statement ok
 (k,v):= json.unfold(js)
@@ -75,19 +75,19 @@ io.print(k,v)
 ----
 0
 NULL
-{ "category": "reference", "author": "Nigel Rees", "title": "Sayings of the 
Century", "price": 8.95 }
+{"category":"reference","author":"Nigel Rees","title":"Sayings of the 
Century","price":8.95}
 1
 NULL
-{ "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", 
"price": 12.99 }
+{"category":"fiction","author":"Evelyn Waugh","title":"Sword of 
Honour","price":12.99}
 2
 NULL
-{ "category": "fiction", "author": "Herman Melville", "title": "Moby Dick", 
"isbn": "0-553-21311-3", "price": 8.99 }
+{"category":"fiction","author":"Herman Melville","title":"Moby 
Dick","isbn":"0-553-21311-3","price":8.99}
 3
 NULL
-{ "category": "fiction", "author": "J. R. R. Tolkien", "title": "The Lord of 
the Rings", "isbn": "0-395-19395-8", "price": 22.99 }
+{"category":"fiction","author":"J. R. R. Tolkien","title":"The Lord of the 
Rings","isbn":"0-395-19395-8","price":22.99}
 4
 NULL
-{ "color": "red", "price": 19.95 }
+{"color":"red","price":19.95}
 
 statement ok
 jsn:= json.fold(k,v)
@@ -95,7 +95,7 @@ jsn:= json.fold(k,v)
 query T rowsort
 io.print(jsn)
 ----
-"[{ \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": 
\"Sayings of the Century\", \"price\": 8.95 },{ \"category\": \"fiction\", 
\"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99 
},{ \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": 
\"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 8.99 },{ \"category\": 
\"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the 
Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 },{ \"color\": \"red\", 
\"price\": 19.95 }]"
+"[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":\"Sayings of 
the Century\",\"price\":8.95},{\"category\":\"fiction\",\"author\":\"Evelyn 
Waugh\",\"title\":\"Sword of 
Honour\",\"price\":12.99},{\"category\":\"fiction\",\"author\":\"Herman 
Melville\",\"title\":\"Moby 
Dick\",\"isbn\":\"0-553-21311-3\",\"price\":8.99},{\"category\":\"fiction\",\"author\":\"J.
 R. R. Tolkien\",\"title\":\"The Lord of the 
Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99},{\"color\":\"red\",\"price\":19.95}]"
 
 statement ok
 (o,l,w):= json.unfold(js)
@@ -106,23 +106,23 @@ io.print(o,l,w)
 0
 0
 NULL
-{ "category": "reference", "author": "Nigel Rees", "title": "Sayings of the 
Century", "price": 8.95 }
+{"category":"reference","author":"Nigel Rees","title":"Sayings of the 
Century","price":8.95}
 1
 1
 NULL
-{ "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", 
"price": 12.99 }
+{"category":"fiction","author":"Evelyn Waugh","title":"Sword of 
Honour","price":12.99}
 2
 2
 NULL
-{ "category": "fiction", "author": "Herman Melville", "title": "Moby Dick", 
"isbn": "0-553-21311-3", "price": 8.99 }
+{"category":"fiction","author":"Herman Melville","title":"Moby 
Dick","isbn":"0-553-21311-3","price":8.99}
 3
 3
 NULL
-{ "category": "fiction", "author": "J. R. R. Tolkien", "title": "The Lord of 
the Rings", "isbn": "0-395-19395-8", "price": 22.99 }
+{"category":"fiction","author":"J. R. R. Tolkien","title":"The Lord of the 
Rings","isbn":"0-395-19395-8","price":22.99}
 4
 4
 NULL
-{ "color": "red", "price": 19.95 }
+{"color":"red","price":19.95}
 
 statement ok
 jsm:= json.fold(o,l,w)
@@ -130,7 +130,7 @@ jsm:= json.fold(o,l,w)
 query T rowsort
 io.print(jsm)
 ----
-"[{ \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": 
\"Sayings of the Century\", \"price\": 8.95 },, { \"category\": \"fiction\", 
\"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99 
},, { \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": 
\"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 8.99 },, { \"category\": 
\"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the 
Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 },, { \"color\": 
\"red\", \"price\": 19.95 }]"
+"[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":\"Sayings of 
the Century\",\"price\":8.95},, {\"category\":\"fiction\",\"author\":\"Evelyn 
Waugh\",\"title\":\"Sword of Honour\",\"price\":12.99},, 
{\"category\":\"fiction\",\"author\":\"Herman Melville\",\"title\":\"Moby 
Dick\",\"isbn\":\"0-553-21311-3\",\"price\":8.99},, 
{\"category\":\"fiction\",\"author\":\"J. R. R. Tolkien\",\"title\":\"The Lord 
of the Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99},, 
{\"color\":\"red\",\"price\":19.95}]"
 
 statement ok
 b:= bat.new(:int)
diff --git a/monetdb5/modules/atoms/Tests/json04.maltest 
b/monetdb5/modules/atoms/Tests/json04.maltest
--- a/monetdb5/modules/atoms/Tests/json04.maltest
+++ b/monetdb5/modules/atoms/Tests/json04.maltest
@@ -4,7 +4,7 @@ js:= calc.json("[{ \"category\": \"refer
 query T rowsort
 io.print(js)
 ----
-"[{ \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": 
\"Sayings of the Century\", \"price\": 8.95 }, { \"category\": \"fiction\", 
\"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99 
}, { \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": 
\"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 8.99 }, { \"category\": 
\"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the 
Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 }, { \"color\": \"red\", 
\"price\": 19.95 }]"
+"[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":\"Sayings of 
the Century\",\"price\":8.95},{\"category\":\"fiction\",\"author\":\"Evelyn 
Waugh\",\"title\":\"Sword of 
Honour\",\"price\":12.99},{\"category\":\"fiction\",\"author\":\"Herman 
Melville\",\"title\":\"Moby 
Dick\",\"isbn\":\"0-553-21311-3\",\"price\":8.99},{\"category\":\"fiction\",\"author\":\"J.
 R. R. Tolkien\",\"title\":\"The Lord of the 
Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99},{\"color\":\"red\",\"price\":19.95}]"
 
 statement ok
 (k,v):= json.unfold(js)
@@ -14,19 +14,19 @@ io.print(k,v)
 ----
 0
 NULL
-{ "category": "reference", "author": "Nigel Rees", "title": "Sayings of the 
Century", "price": 8.95 }
+{"category":"reference","author":"Nigel Rees","title":"Sayings of the 
Century","price":8.95}
 1
 NULL
-{ "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", 
"price": 12.99 }
+{"category":"fiction","author":"Evelyn Waugh","title":"Sword of 
Honour","price":12.99}
 2
 NULL
-{ "category": "fiction", "author": "Herman Melville", "title": "Moby Dick", 
"isbn": "0-553-21311-3", "price": 8.99 }
+{"category":"fiction","author":"Herman Melville","title":"Moby 
Dick","isbn":"0-553-21311-3","price":8.99}
 3
 NULL
-{ "category": "fiction", "author": "J. R. R. Tolkien", "title": "The Lord of 
the Rings", "isbn": "0-395-19395-8", "price": 22.99 }
+{"category":"fiction","author":"J. R. R. Tolkien","title":"The Lord of the 
Rings","isbn":"0-395-19395-8","price":22.99}
 4
 NULL
-{ "color": "red", "price": 19.95 }
+{"color":"red","price":19.95}
 
 statement ok
 jsn:= json.fold(k,v)
@@ -34,7 +34,7 @@ jsn:= json.fold(k,v)
 query T rowsort
 io.print(jsn)
 ----
-"[{ \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": 
\"Sayings of the Century\", \"price\": 8.95 },{ \"category\": \"fiction\", 
\"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99 
},{ \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": 
\"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 8.99 },{ \"category\": 
\"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the 
Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 },{ \"color\": \"red\", 
\"price\": 19.95 }]"
+"[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":\"Sayings of 
the Century\",\"price\":8.95},{\"category\":\"fiction\",\"author\":\"Evelyn 
Waugh\",\"title\":\"Sword of 
Honour\",\"price\":12.99},{\"category\":\"fiction\",\"author\":\"Herman 
Melville\",\"title\":\"Moby 
Dick\",\"isbn\":\"0-553-21311-3\",\"price\":8.99},{\"category\":\"fiction\",\"author\":\"J.
 R. R. Tolkien\",\"title\":\"The Lord of the 
Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99},{\"color\":\"red\",\"price\":19.95}]"
 
 statement ok
 (o,l,w):= json.unfold(js)
@@ -45,23 +45,23 @@ io.print(o,l,w)
 0
 0
 NULL
-{ "category": "reference", "author": "Nigel Rees", "title": "Sayings of the 
Century", "price": 8.95 }
+{"category":"reference","author":"Nigel Rees","title":"Sayings of the 
Century","price":8.95}
 1
 1
 NULL
-{ "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", 
"price": 12.99 }
+{"category":"fiction","author":"Evelyn Waugh","title":"Sword of 
Honour","price":12.99}
 2
 2
 NULL
-{ "category": "fiction", "author": "Herman Melville", "title": "Moby Dick", 
"isbn": "0-553-21311-3", "price": 8.99 }
+{"category":"fiction","author":"Herman Melville","title":"Moby 
Dick","isbn":"0-553-21311-3","price":8.99}
 3
 3
 NULL
-{ "category": "fiction", "author": "J. R. R. Tolkien", "title": "The Lord of 
the Rings", "isbn": "0-395-19395-8", "price": 22.99 }
+{"category":"fiction","author":"J. R. R. Tolkien","title":"The Lord of the 
Rings","isbn":"0-395-19395-8","price":22.99}
 4
 4
 NULL
-{ "color": "red", "price": 19.95 }
+{"color":"red","price":19.95}
 
 statement ok
 barrier (i,j):= iterator.new(w)
@@ -75,19 +75,19 @@ redo (i,j) := iterator.next(w)
 query T rowsort
 exit (i,j)
 ----
-"{ \"category\": \"fiction\", \"author\": \"Evelyn Waugh\", \"title\": \"Sword 
of Honour\", \"price\": 12.99 }"
-"{ \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": 
\"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 8.99 }"
-"{ \"category\": \"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": 
\"The Lord of the Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 }"
-"{ \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": 
\"Sayings of the Century\", \"price\": 8.95 }"
-"{ \"color\": \"red\", \"price\": 19.95 }"
+"{\"category\":\"fiction\",\"author\":\"Evelyn Waugh\",\"title\":\"Sword of 
Honour\",\"price\":12.99}"
+"{\"category\":\"fiction\",\"author\":\"Herman Melville\",\"title\":\"Moby 
Dick\",\"isbn\":\"0-553-21311-3\",\"price\":8.99}"
+"{\"category\":\"fiction\",\"author\":\"J. R. R. Tolkien\",\"title\":\"The 
Lord of the Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99}"
+"{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":\"Sayings of 
the Century\",\"price\":8.95}"
+"{\"color\":\"red\",\"price\":19.95}"
 
 statement ok
-js := calc.json("[1,true, [2,false]]")
+js := calc.json("[1,true,[2,false]]")
 
 query T rowsort
 io.print(js)
 ----
-"[1,true, [2,false]]"
+"[1,true,[2,false]]"
 
 statement ok
 (l1,l2) := json.unfold(js)
diff --git a/monetdb5/modules/atoms/Tests/json05.maltest 
b/monetdb5/modules/atoms/Tests/json05.maltest
--- a/monetdb5/modules/atoms/Tests/json05.maltest
+++ b/monetdb5/modules/atoms/Tests/json05.maltest
@@ -4,7 +4,7 @@ js:= calc.json("[{\"book\":{ \"category\
 query T rowsort
 io.print(js)
 ----
-"[{\"book\":{ \"category\": \"reference\", \"author\": \"Nigel Rees\", 
\"title\": \"Sayings of the Century\", \"price\": 8.95 }, \"book\":{ 
\"category\": \"fiction\", \"author\": \"Evelyn Waugh\", \"title\": \"Sword of 
Honour\", \"price\": 12.99 }, \"book\":{ \"category\": \"fiction\", \"author\": 
\"Herman Melville\", \"title\": \"Moby Dick\", \"isbn\": \"0-553-21311-3\", 
\"price\": 8.99 }, \"book\":{ \"category\": \"fiction\", \"author\": \"J. R. R. 
Tolkien\", \"title\": \"The Lord of the Rings\", \"isbn\": \"0-395-19395-8\", 
\"price\": 22.99 }}, {\"pencil\":{ \"color\": \"red\", \"price\": 19.95 }}]"
+"[{\"book\":{\"category\":\"fiction\",\"author\":\"J. R. R. 
Tolkien\",\"title\":\"The Lord of the 
Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99}},{\"pencil\":{\"color\":\"red\",\"price\":19.95}}]"
 
 statement ok
 p:= json.filter(js,"[0].book")
@@ -12,7 +12,7 @@ p:= json.filter(js,"[0].book")
 query T rowsort
 io.print(p)
 ----
-"{ \"category\": \"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": 
\"The Lord of the Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 }"
+"{\"category\":\"fiction\",\"author\":\"J. R. R. Tolkien\",\"title\":\"The 
Lord of the Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99}"
 
 statement ok
 p:= json.filter(js,"[1].pencil")
@@ -20,7 +20,7 @@ p:= json.filter(js,"[1].pencil")
 query T rowsort
 io.print(p)
 ----
-"{ \"color\": \"red\", \"price\": 19.95 }"
+"{\"color\":\"red\",\"price\":19.95}"
 
 statement ok
 p:= json.filter(js,"..author")
@@ -44,7 +44,7 @@ p:= json.filter(js,"[0].book[0]")
 query T rowsort
 io.print(p)
 ----
-"{ \"category\": \"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": 
\"The Lord of the Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 }"
+"{\"category\":\"fiction\",\"author\":\"J. R. R. Tolkien\",\"title\":\"The 
Lord of the Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99}"
 
 statement ok
 p:= json.filter(js,"[0].book[1]")
@@ -79,7 +79,7 @@ io.print(p)
 "[\"fiction\"]"
 
 statement ok
-js := calc.json("[[{\"name\":\"john\"}], {\"name\":\"mary\"}]")
+js := calc.json("[[{\"name\":\"john\"}],{\"name\":\"mary\"}]")
 
 statement ok
 p := json.filter(js,"..name")
diff --git a/monetdb5/modules/atoms/Tests/json13.maltest 
b/monetdb5/modules/atoms/Tests/json13.maltest
--- a/monetdb5/modules/atoms/Tests/json13.maltest
+++ b/monetdb5/modules/atoms/Tests/json13.maltest
@@ -5,7 +5,7 @@ query IT rowsort
 jd := json.dump(js);
 io.print(jd);
 ----
-110 values hashing to 84992dc677b13759a408ee7ea3828340
+110 values hashing to e60d29076f651b708743a03ffd9f2b0b
 
 statement ok
 p:= json.filter(js,".store.book[*]..author")
@@ -37,7 +37,7 @@ p:= json.filter(js,".store")
 query T rowsort
 io.print(p)
 ----
-"{ \"book\": [ { \"category\": \"reference\", \"author\": \"Nigel Rees\", 
\"title\": \"Sayings of the Century\", \"price\": 8.95 }, { \"category\": 
\"fiction\", \"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", 
\"price\": 12.99 }, { \"category\": \"fiction\", \"author\": \"Herman 
Melville\", \"title\": \"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 
8.99 }, { \"category\": \"fiction\", \"author\": \"J. R. R. Tolkien\", 
\"title\": \"The Lord of the Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 
22.99 } ], \"bicycle\": { \"color\": \"red\", \"price\": 19.95 } }"
+"{\"book\":[{\"category\":\"reference\",\"author\":\"Nigel 
Rees\",\"title\":\"Sayings of the 
Century\",\"price\":8.95},{\"category\":\"fiction\",\"author\":\"Evelyn 
Waugh\",\"title\":\"Sword of 
Honour\",\"price\":12.99},{\"category\":\"fiction\",\"author\":\"Herman 
Melville\",\"title\":\"Moby 
Dick\",\"isbn\":\"0-553-21311-3\",\"price\":8.99},{\"category\":\"fiction\",\"author\":\"J.
 R. R. Tolkien\",\"title\":\"The Lord of the 
Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99}],\"bicycle\":{\"color\":\"red\",\"price\":19.95}}"
 
 statement ok
 p:= json.filter(js,"$.store")
@@ -45,7 +45,7 @@ p:= json.filter(js,"$.store")
 query T rowsort
 io.print(p)
 ----
-"{ \"book\": [ { \"category\": \"reference\", \"author\": \"Nigel Rees\", 
\"title\": \"Sayings of the Century\", \"price\": 8.95 }, { \"category\": 
\"fiction\", \"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", 
\"price\": 12.99 }, { \"category\": \"fiction\", \"author\": \"Herman 
Melville\", \"title\": \"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 
8.99 }, { \"category\": \"fiction\", \"author\": \"J. R. R. Tolkien\", 
\"title\": \"The Lord of the Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 
22.99 } ], \"bicycle\": { \"color\": \"red\", \"price\": 19.95 } }"
+"{\"book\":[{\"category\":\"reference\",\"author\":\"Nigel 
Rees\",\"title\":\"Sayings of the 
Century\",\"price\":8.95},{\"category\":\"fiction\",\"author\":\"Evelyn 
Waugh\",\"title\":\"Sword of 
Honour\",\"price\":12.99},{\"category\":\"fiction\",\"author\":\"Herman 
Melville\",\"title\":\"Moby 
Dick\",\"isbn\":\"0-553-21311-3\",\"price\":8.99},{\"category\":\"fiction\",\"author\":\"J.
 R. R. Tolkien\",\"title\":\"The Lord of the 
Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99}],\"bicycle\":{\"color\":\"red\",\"price\":19.95}}"
 
 statement ok
 p:= json.filter(js,".store.*")
@@ -53,7 +53,7 @@ p:= json.filter(js,".store.*")
 query T rowsort
 io.print(p)
 ----
-"[[ { \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": 
\"Sayings of the Century\", \"price\": 8.95 }, { \"category\": \"fiction\", 
\"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99 
}, { \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": 
\"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 8.99 }, { \"category\": 
\"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the 
Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 } ],{ \"color\": 
\"red\", \"price\": 19.95 }]"
+"[[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":\"Sayings 
of the Century\",\"price\":8.95},{\"category\":\"fiction\",\"author\":\"Evelyn 
Waugh\",\"title\":\"Sword of 
Honour\",\"price\":12.99},{\"category\":\"fiction\",\"author\":\"Herman 
Melville\",\"title\":\"Moby 
Dick\",\"isbn\":\"0-553-21311-3\",\"price\":8.99},{\"category\":\"fiction\",\"author\":\"J.
 R. R. Tolkien\",\"title\":\"The Lord of the 
Rings\",\"isbn\":\"0-395-19395-8\",\"price\":22.99}],{\"color\":\"red\",\"price\":19.95}]"
 
 statement ok
 p:= json.filter(js,".store..price")
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to