From 05fda4afa289ef248804865d7648c9ac3ae75fbd Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 4 May 2022 09:12:57 -0400 Subject: Change JSON parser to parse from an InputSource --- include/qpdf/JSON.hh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/qpdf/JSON.hh b/include/qpdf/JSON.hh index 24d09cc2..435c2362 100644 --- a/include/qpdf/JSON.hh +++ b/include/qpdf/JSON.hh @@ -46,6 +46,7 @@ #include class Pipeline; +class InputSource; class JSON { @@ -249,10 +250,13 @@ class JSON virtual bool arrayItem(JSON const& value) = 0; }; - // Create a JSON object from a string. See above for information - // about how to use the Reactor. + // Create a JSON object from a string. QPDF_DLL - static JSON parse(std::string const&, Reactor* reactor = nullptr); + static JSON parse(std::string const&); + // Create a JSON object from an input source. See above for + // information about how to use the Reactor. + QPDF_DLL + static JSON parse(InputSource&, Reactor* reactor = nullptr); // parse calls setOffsets to set the inclusive start and // non-inclusive end offsets of an object relative to its input -- cgit v1.2.3-70-g09d2