summaryrefslogtreecommitdiffstats
path: root/test/json-mapped/array-of-objects-header
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:48:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:48:59 +0000
commitc484829272cd13a738e35412498e12f2c9a194ac (patch)
treea1f5ec09629ee895bd3963fa8820b45f2f4c574b /test/json-mapped/array-of-objects-header
parentInitial commit. (diff)
downloadliborcus-c484829272cd13a738e35412498e12f2c9a194ac.tar.xz
liborcus-c484829272cd13a738e35412498e12f2c9a194ac.zip
Adding upstream version 0.19.2.upstream/0.19.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/json-mapped/array-of-objects-header')
-rw-r--r--test/json-mapped/array-of-objects-header/check.txt64
-rw-r--r--test/json-mapped/array-of-objects-header/input.json15
-rw-r--r--test/json-mapped/array-of-objects-header/map.json16
3 files changed, 95 insertions, 0 deletions
diff --git a/test/json-mapped/array-of-objects-header/check.txt b/test/json-mapped/array-of-objects-header/check.txt
new file mode 100644
index 0000000..63d7e01
--- /dev/null
+++ b/test/json-mapped/array-of-objects-header/check.txt
@@ -0,0 +1,64 @@
+models/0/0:string:"Record ID"
+models/0/1:string:"Model Year"
+models/0/2:string:"Make"
+models/0/3:string:"Model"
+models/1/0:numeric:1
+models/1/1:numeric:1992
+models/1/2:string:"Mazda"
+models/1/3:string:"MPV"
+models/2/0:numeric:2
+models/2/1:numeric:2008
+models/2/2:string:"GMC"
+models/2/3:string:"Savana 1500"
+models/3/0:numeric:3
+models/3/1:numeric:1994
+models/3/2:string:"Mitsubishi"
+models/3/3:string:"RVR"
+models/4/0:numeric:4
+models/4/1:numeric:2005
+models/4/2:string:"Mercury"
+models/4/3:string:"Grand Marquis"
+models/5/0:numeric:5
+models/5/1:numeric:1994
+models/5/2:string:"Volkswagen"
+models/5/3:string:"Golf"
+models/6/0:numeric:6
+models/6/1:numeric:1996
+models/6/2:string:"Cadillac"
+models/6/3:string:"Eldorado"
+models/7/0:numeric:7
+models/7/1:numeric:2000
+models/7/2:string:"Cadillac"
+models/7/3:string:"Escalade"
+models/8/0:numeric:8
+models/8/1:numeric:2009
+models/8/2:string:"Kia"
+models/8/3:string:"Mohave/Borrego"
+models/9/0:numeric:9
+models/9/1:numeric:1988
+models/9/2:string:"Volkswagen"
+models/9/3:string:"Cabriolet"
+models/10/0:numeric:10
+models/10/1:numeric:2008
+models/10/2:string:"Acura"
+models/10/3:string:"TSX"
+models/11/0:numeric:11
+models/11/1:numeric:1993
+models/11/2:string:"Chrysler"
+models/11/3:string:"Imperial"
+models/12/0:numeric:12
+models/12/1:numeric:2009
+models/12/2:string:"Hyundai"
+models/12/3:string:"Azera"
+models/13/0:numeric:13
+models/13/1:numeric:2012
+models/13/2:string:"Ford"
+models/13/3:string:"Focus"
+models/14/0:numeric:14
+models/14/1:numeric:1999
+models/14/2:string:"GMC"
+models/14/3:string:"Suburban 2500"
+models/15/0:numeric:15
+models/15/1:numeric:2009
+models/15/2:string:"Pontiac"
+models/15/3:string:"G5"
diff --git a/test/json-mapped/array-of-objects-header/input.json b/test/json-mapped/array-of-objects-header/input.json
new file mode 100644
index 0000000..d9b6605
--- /dev/null
+++ b/test/json-mapped/array-of-objects-header/input.json
@@ -0,0 +1,15 @@
+[{"Record ID":1,"Model Year":1992,"Make":"Mazda","Model":"MPV"},
+{"Record ID":2,"Model Year":2008,"Make":"GMC","Model":"Savana 1500"},
+{"Record ID":3,"Model Year":1994,"Make":"Mitsubishi","Model":"RVR"},
+{"Record ID":4,"Model Year":2005,"Make":"Mercury","Model":"Grand Marquis"},
+{"Record ID":5,"Model Year":1994,"Make":"Volkswagen","Model":"Golf"},
+{"Record ID":6,"Model Year":1996,"Make":"Cadillac","Model":"Eldorado"},
+{"Record ID":7,"Model Year":2000,"Make":"Cadillac","Model":"Escalade"},
+{"Record ID":8,"Model Year":2009,"Make":"Kia","Model":"Mohave/Borrego"},
+{"Record ID":9,"Model Year":1988,"Make":"Volkswagen","Model":"Cabriolet"},
+{"Record ID":10,"Model Year":2008,"Make":"Acura","Model":"TSX"},
+{"Record ID":11,"Model Year":1993,"Make":"Chrysler","Model":"Imperial"},
+{"Record ID":12,"Model Year":2009,"Make":"Hyundai","Model":"Azera"},
+{"Record ID":13,"Model Year":2012,"Make":"Ford","Model":"Focus"},
+{"Record ID":14,"Model Year":1999,"Make":"GMC","Model":"Suburban 2500"},
+{"Record ID":15,"Model Year":2009,"Make":"Pontiac","Model":"G5"}] \ No newline at end of file
diff --git a/test/json-mapped/array-of-objects-header/map.json b/test/json-mapped/array-of-objects-header/map.json
new file mode 100644
index 0000000..0e772f4
--- /dev/null
+++ b/test/json-mapped/array-of-objects-header/map.json
@@ -0,0 +1,16 @@
+{
+ "sheets": ["models"],
+ "ranges": [
+ {"row": 0, "column": 0, "sheet": "models", "row-header": true,
+ "fields": [
+ {"path": "$[]['Record ID']"},
+ {"path": "$[]['Model Year']"},
+ {"path": "$[]['Make']"},
+ {"path": "$[]['Model']"},
+ ],
+ "row-groups": [
+ {"path": "$"},
+ ]
+ }
+ ]
+}