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-structure/multiple-ranges/check.txt | 5 +++ test/json-structure/multiple-ranges/input.json | 49 ++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 test/json-structure/multiple-ranges/check.txt create mode 100644 test/json-structure/multiple-ranges/input.json (limited to 'test/json-structure/multiple-ranges') diff --git a/test/json-structure/multiple-ranges/check.txt b/test/json-structure/multiple-ranges/check.txt new file mode 100644 index 0000000..49cf18b --- /dev/null +++ b/test/json-structure/multiple-ranges/check.txt @@ -0,0 +1,5 @@ +$object['data'].array[7].object(*)['category'].value +$object['data'].array[7].object(*)['records'].array[7].object(*)['id'].value +$object['data'].array[7].object(*)['records'].array[7].object(*)['ref'].value +$object['data'].array[7].object(*)['region'].value +$object['misc'].array[2].array(*)[3].value[0,1,2] diff --git a/test/json-structure/multiple-ranges/input.json b/test/json-structure/multiple-ranges/input.json new file mode 100644 index 0000000..e604b13 --- /dev/null +++ b/test/json-structure/multiple-ranges/input.json @@ -0,0 +1,49 @@ +{ + "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"} + ] + }, + {"category": "C", "region": "fr-CA", + "records": [ + {"id": 3000, "ref": "C123456789"}, + {"id": 3001, "ref": "C987654320"}, + {"id": 3002, "ref": "C987654321"}, + {"id": 3003, "ref": "C987654322"}, + {"id": 3004, "ref": "C987654323"}, + {"id": 3005, "ref": "C987654324"}, + {"id": 3006, "ref": "C987654325"} + ] + }, + {"category": "D", "region": "unknown", + "records": [ + {"id": 4000, "ref": "D123456789"}, + ] + }, + {"category": "E", "records": []}, + {"category": "F", + "records": [ + {"id": 6000, "ref": "F123456789"} + ] + }, + {"category": "G", "region": "en-GB", + "records": [ + {"id": 7000, "ref": "G123456789"}, + {"id": 7000, "ref": "G123456780"} + ] + } + ], + "misc": [ + [1, 2, 3], + [4, 5, 6], + ] +} \ No newline at end of file -- cgit v1.2.3