From 4c7cfd5cbc64c34b4532aad0d87e4c81e2277b02 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 14 May 2022 10:11:52 -0400 Subject: 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. --- libtests/qtest/json_parse/good-10-react.out | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libtests/qtest/json_parse/good-10-react.out') 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" -- cgit v1.2.3-54-g00ecf