QPDFJob JSON: allow single item in place of array

This commit is contained in:
Jay Berkenbilt 2024-01-09 20:29:01 -05:00
parent 7de0b3f3c0
commit 0161f62e38
1 changed files with 1 additions and 0 deletions

View File

@ -204,6 +204,7 @@ Handlers::beginArray(json_handler_t start_fn, bare_handler_t end_fn)
[start_fn](std::string const&, JSON j) { start_fn(j); },
[end_fn](std::string const&) { end_fn(); },
item_jh);
jh->addFallbackHandler(item_jh);
this->json_handlers.push_back(item_jh);
this->jh = item_jh.get();
}