diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:48:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:48:59 +0000 |
commit | c484829272cd13a738e35412498e12f2c9a194ac (patch) | |
tree | a1f5ec09629ee895bd3963fa8820b45f2f4c574b /test/json-mapped/array-of-objects-basic | |
parent | Initial commit. (diff) | |
download | liborcus-upstream/0.19.2.tar.xz liborcus-upstream/0.19.2.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-basic')
-rw-r--r-- | test/json-mapped/array-of-objects-basic/check.txt | 20 | ||||
-rw-r--r-- | test/json-mapped/array-of-objects-basic/input.json | 32 | ||||
-rw-r--r-- | test/json-mapped/array-of-objects-basic/map.json | 16 |
3 files changed, 68 insertions, 0 deletions
diff --git a/test/json-mapped/array-of-objects-basic/check.txt b/test/json-mapped/array-of-objects-basic/check.txt new file mode 100644 index 0000000..6aba1bb --- /dev/null +++ b/test/json-mapped/array-of-objects-basic/check.txt @@ -0,0 +1,20 @@ +Imported/0/0:numeric:1 +Imported/0/1:string:"Caitlin" +Imported/0/2:string:"Kealy" +Imported/0/3:string:"ckealy0@hud.gov" +Imported/1/0:numeric:2 +Imported/1/1:string:"Bernice" +Imported/1/2:string:"McEvilly" +Imported/1/3:string:"bmcevilly1@comsenz.com" +Imported/2/0:numeric:3 +Imported/2/1:string:"Ariel" +Imported/2/2:string:"Casajuana" +Imported/2/3:string:"acasajuana2@fema.gov" +Imported/3/0:numeric:4 +Imported/3/1:string:"Grannie" +Imported/3/2:string:"Parlot" +Imported/3/3:string:"gparlot3@soup.io" +Imported/4/0:numeric:5 +Imported/4/1:string:"Merridie" +Imported/4/2:string:"Dungey" +Imported/4/3:string:"mdungey4@nifty.com" diff --git a/test/json-mapped/array-of-objects-basic/input.json b/test/json-mapped/array-of-objects-basic/input.json new file mode 100644 index 0000000..1d10e9e --- /dev/null +++ b/test/json-mapped/array-of-objects-basic/input.json @@ -0,0 +1,32 @@ +[ + { + "id": 1, + "first_name": "Caitlin", + "last_name": "Kealy", + "email": "ckealy0@hud.gov" + }, + { + "id": 2, + "first_name": "Bernice", + "last_name": "McEvilly", + "email": "bmcevilly1@comsenz.com" + }, + { + "id": 3, + "first_name": "Ariel", + "last_name": "Casajuana", + "email": "acasajuana2@fema.gov" + }, + { + "id": 4, + "first_name": "Grannie", + "last_name": "Parlot", + "email": "gparlot3@soup.io" + }, + { + "id": 5, + "first_name": "Merridie", + "last_name": "Dungey", + "email": "mdungey4@nifty.com" + } +]
\ No newline at end of file diff --git a/test/json-mapped/array-of-objects-basic/map.json b/test/json-mapped/array-of-objects-basic/map.json new file mode 100644 index 0000000..a9b949c --- /dev/null +++ b/test/json-mapped/array-of-objects-basic/map.json @@ -0,0 +1,16 @@ +{ + "sheets": ["Imported"], + "ranges": [ + {"sheet": "Imported", "row": 0, "column": 0, + "fields": [ + {"path": "$[]['id']"}, + {"path": "$[]['first_name']"}, + {"path": "$[]['last_name']"}, + {"path": "$[]['email']"} + ], + "row-groups": [ + {"path": "$"} + ] + } + ] +} |