From c484829272cd13a738e35412498e12f2c9a194ac Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:48:59 +0200 Subject: Adding upstream version 0.19.2. Signed-off-by: Daniel Baumann --- test/json-mapped/nested-repeats-2/check.txt | 25 +++++++++++++++++++++++++ test/json-mapped/nested-repeats-2/input.json | 20 ++++++++++++++++++++ test/json-mapped/nested-repeats-2/map.json | 24 ++++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 test/json-mapped/nested-repeats-2/check.txt create mode 100644 test/json-mapped/nested-repeats-2/input.json create mode 100644 test/json-mapped/nested-repeats-2/map.json (limited to 'test/json-mapped/nested-repeats-2') 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']"} + ] + } + ] +} -- cgit v1.2.3