Commit 0161f62e38fa44ef7fe88138d62a9f0b96f2921d

Authored by Jay Berkenbilt
1 parent 7de0b3f3

QPDFJob JSON: allow single item in place of array

Showing 1 changed file with 1 additions and 0 deletions
libqpdf/QPDFJob_json.cc
@@ -204,6 +204,7 @@ Handlers::beginArray(json_handler_t start_fn, bare_handler_t end_fn) @@ -204,6 +204,7 @@ Handlers::beginArray(json_handler_t start_fn, bare_handler_t end_fn)
204 [start_fn](std::string const&, JSON j) { start_fn(j); }, 204 [start_fn](std::string const&, JSON j) { start_fn(j); },
205 [end_fn](std::string const&) { end_fn(); }, 205 [end_fn](std::string const&) { end_fn(); },
206 item_jh); 206 item_jh);
  207 + jh->addFallbackHandler(item_jh);
207 this->json_handlers.push_back(item_jh); 208 this->json_handlers.push_back(item_jh);
208 this->jh = item_jh.get(); 209 this->jh = item_jh.get();
209 } 210 }