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/nested-repeats-2 | |
parent | Initial commit. (diff) | |
download | liborcus-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/nested-repeats-2')
-rw-r--r-- | test/json-mapped/nested-repeats-2/check.txt | 25 | ||||
-rw-r--r-- | test/json-mapped/nested-repeats-2/input.json | 20 | ||||
-rw-r--r-- | test/json-mapped/nested-repeats-2/map.json | 24 |
3 files changed, 69 insertions, 0 deletions
diff --git a/test/json-mapped/nested-repeats-2/check.txt b/test/json-mapped/nested-repeats-2/check.txt new file mode 100644 index 0000000..0553451 --- /dev/null +++ b/test/json-mapped/nested-repeats-2/check.txt @@ -0,0 +1,25 @@ +nested repeats 2/1/0:string:"foo" +nested repeats 2/1/1:string:"A" +nested repeats 2/1/2:numeric:1000 +nested repeats 2/1/3:string:"A123456789" +nested repeats 2/1/4:string:"en-US" +nested repeats 2/2/0:string:"foo" +nested repeats 2/2/1:string:"A" +nested repeats 2/2/2:numeric:1001 +nested repeats 2/2/3:string:"A987654321" +nested repeats 2/2/4:string:"en-US" +nested repeats 2/3/0:string:"foo" +nested repeats 2/3/1:string:"B" +nested repeats 2/3/2:numeric:2000 +nested repeats 2/3/3:string:"B123456789" +nested repeats 2/3/4:string:"ja-JP" +nested repeats 2/4/0:string:"foo" +nested repeats 2/4/1:string:"B" +nested repeats 2/4/2:numeric:2001 +nested repeats 2/4/3:string:"B987654321" +nested repeats 2/4/4:string:"ja-JP" +nested repeats 2/5/0:string:"foo" +nested repeats 2/5/1:string:"B" +nested repeats 2/5/2:numeric:2002 +nested repeats 2/5/3:string:"B987654323" +nested repeats 2/5/4:string:"ja-JP" diff --git a/test/json-mapped/nested-repeats-2/input.json b/test/json-mapped/nested-repeats-2/input.json new file mode 100644 index 0000000..ac3da5e --- /dev/null +++ b/test/json-mapped/nested-repeats-2/input.json @@ -0,0 +1,20 @@ +[ + {"parent": "foo", + "data": + [ + {"category": "A", "region": "en-US", + "records": [ + {"id": 1000, "ref": "A123456789"}, + {"id": 1001, "ref": "A987654321"} + ] + }, + {"category": "B", "region": "ja-JP", + "records": [ + {"id": 2000, "ref": "B123456789"}, + {"id": 2001, "ref": "B987654321"}, + {"id": 2002, "ref": "B987654323"} + ] + } + ] + } +] diff --git a/test/json-mapped/nested-repeats-2/map.json b/test/json-mapped/nested-repeats-2/map.json new file mode 100644 index 0000000..293462d --- /dev/null +++ b/test/json-mapped/nested-repeats-2/map.json @@ -0,0 +1,24 @@ +{ + "sheets": ["nested repeats 2"], + + "ranges": [ + {"sheet": "nested repeats 2", + "row": 1, + "column": 0, + + "fields": [ + {"path": "$[]['parent']"}, + {"path": "$[]['data'][]['category']"}, + {"path": "$[]['data'][]['records'][]['id']"}, + {"path": "$[]['data'][]['records'][]['ref']"}, + {"path": "$[]['data'][]['region']"} + ], + + "row-groups": [ + {"path": "$"}, + {"path": "$[]['data']"}, + {"path": "$[]['data'][]['records']"} + ] + } + ] +} |