diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-01-30 14:18:04 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-01-31 21:57:45 +0100 |
commit | ce3406e93f0de0946d2abed6179579caf1433d4e (patch) | |
tree | 71959581731cb1ddcafa0866c87b2346c177dffb /libtests/qtest/json_handler | |
parent | 11a86e444da4ffcb0d5aa5203fda2d0ebc001a7c (diff) | |
download | qpdf-ce3406e93f0de0946d2abed6179579caf1433d4e.tar.zst |
JSONHandler: pass JSON object to dict start function
If some keys depend on others, we have to check up front since there
is no control of what order key handlers will be called. Anyway, keys
are unordered in json, so we don't want to depend on ordering.
Diffstat (limited to 'libtests/qtest/json_handler')
-rw-r--r-- | libtests/qtest/json_handler/json_handler.out | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/libtests/qtest/json_handler/json_handler.out b/libtests/qtest/json_handler/json_handler.out index 368c94b5..d9d99660 100644 --- a/libtests/qtest/json_handler/json_handler.out +++ b/libtests/qtest/json_handler/json_handler.out @@ -1,7 +1,30 @@ -- scalar -- .: string: potato -- all -- -.: json: dict begin +.: json: { + "five": [ + "x", + false, + "y", + null, + true + ], + "four": [ + "a", + 1 + ], + "one": "potato", + "phour": null, + "six": { + "a": { + "Q": "baaa", + "b": "quack" + }, + "b": "moo" + }, + "three": true, + "two": 3.14 +} .five: json: array begin .five[0]: string: x .five[1]: bool: false @@ -15,8 +38,17 @@ ] .one: string: potato .phour: json: null -.six: json: dict begin -.six.a: json: dict begin +.six: json: { + "a": { + "Q": "baaa", + "b": "quack" + }, + "b": "moo" +} +.six.a: json: { + "Q": "baaa", + "b": "quack" +} .six.a.Q: json: "baaa" .six.a.b: string: quack .six.a: json: dict end @@ -27,5 +59,7 @@ .: json: dict end -- errors -- bad type at top: JSON handler: value at . is not of expected type -.: json: dict begin +.: json: { + "x": "y" +} unexpected key: JSON handler found unexpected key x in object at . |