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 /libqpdf/JSONHandler.cc | |
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 'libqpdf/JSONHandler.cc')
-rw-r--r-- | libqpdf/JSONHandler.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libqpdf/JSONHandler.cc b/libqpdf/JSONHandler.cc index 28e97218..121ae8a2 100644 --- a/libqpdf/JSONHandler.cc +++ b/libqpdf/JSONHandler.cc @@ -49,7 +49,7 @@ JSONHandler::addBoolHandler(bool_handler_t fn) } void -JSONHandler::addDictHandlers(void_handler_t start_fn, void_handler_t end_fn) +JSONHandler::addDictHandlers(json_handler_t start_fn, void_handler_t end_fn) { this->m->h.dict_start_handler = start_fn; this->m->h.dict_end_handler = end_fn; @@ -111,7 +111,7 @@ JSONHandler::handle(std::string const& path, JSON j) } if (this->m->h.dict_start_handler && j.isDictionary()) { - this->m->h.dict_start_handler(path); + this->m->h.dict_start_handler(path, j); std::string path_base = path; if (path_base != ".") { |