diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-05-14 16:11:52 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-05-14 23:35:06 +0200 |
commit | 4c7cfd5cbc64c34b4532aad0d87e4c81e2277b02 (patch) | |
tree | 18619166a65f0f62f33cbb362bda6264d712db08 /libtests/qtest/json_parse | |
parent | 2a2f7f1bba3dd87bd17f8b819ddeb1a24bb742dd (diff) | |
download | qpdf-4c7cfd5cbc64c34b4532aad0d87e4c81e2277b02.tar.zst |
JSON reactor: improve handling of nested containers
Call the parent container's item method before calling the child
item's start method so we can easily know the current nesting level
when nested items are added.
Diffstat (limited to 'libtests/qtest/json_parse')
-rw-r--r-- | libtests/qtest/json_parse/good-01-react.out | 4 | ||||
-rw-r--r-- | libtests/qtest/json_parse/good-04-react.out | 6 | ||||
-rw-r--r-- | libtests/qtest/json_parse/good-10-react.out | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/libtests/qtest/json_parse/good-01-react.out b/libtests/qtest/json_parse/good-01-react.out index d6167a6b..e3813bcc 100644 --- a/libtests/qtest/json_parse/good-01-react.out +++ b/libtests/qtest/json_parse/good-01-react.out @@ -1,14 +1,14 @@ dictionary start dictionary item: a -> [6, 11): "bcd" -array start dictionary item: e -> [18, 0): [] +array start array item: [19, 20): 1 array item: [41, 42): 2 array item: [44, 45): 3 array item: [46, 47): 4 array item: [48, 54): "five" -dictionary start array item: [56, 0): {} +dictionary start dictionary item: six -> [64, 65): 7 dictionary item: 8 -> [72, 73): 9 container end: [56, 74): {} diff --git a/libtests/qtest/json_parse/good-04-react.out b/libtests/qtest/json_parse/good-04-react.out index bd18ccfc..ded004b2 100644 --- a/libtests/qtest/json_parse/good-04-react.out +++ b/libtests/qtest/json_parse/good-04-react.out @@ -1,16 +1,16 @@ array start -array start array item: [1, 0): [] array start array item: [2, 0): [] -dictionary start +array start array item: [3, 0): {} +dictionary start container end: [3, 5): {} container end: [2, 6): [] -dictionary start array item: [8, 0): {} dictionary start dictionary item: -> [13, 0): {} +dictionary start container end: [13, 15): {} container end: [8, 16): {} container end: [1, 17): [] diff --git a/libtests/qtest/json_parse/good-10-react.out b/libtests/qtest/json_parse/good-10-react.out index 142d95d0..3cceeb2f 100644 --- a/libtests/qtest/json_parse/good-10-react.out +++ b/libtests/qtest/json_parse/good-10-react.out @@ -1,30 +1,30 @@ dictionary start -array start dictionary item: a -> [9, 0): [] +array start array item: [10, 11): 1 array item: [13, 14): 2 -dictionary start array item: [16, 0): {} +dictionary start dictionary item: x -> [22, 25): "y" container end: [16, 26): {} array item: [28, 29): 3 -dictionary start array item: [31, 0): {} +dictionary start dictionary item: keep -> [40, 61): "not in final output" container end: [31, 62): { "keep": "not in final output" } container end: [9, 63): [] -array start dictionary item: keep -> [75, 0): [] +array start array item: [76, 77): 1 array item: [79, 83): null array item: [85, 86): 2 array item: [88, 93): false array item: [95, 101): "keep" array item: [103, 104): 3 -array start array item: [106, 0): [] +array start array item: [107, 113): "this" array item: [115, 121): "keep" array item: [123, 128): "not" |