aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/JSON.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-04 15:12:57 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-04 18:07:11 +0200
commit05fda4afa289ef248804865d7648c9ac3ae75fbd (patch)
treef9abf336b01e18fc005590f36d83628807a3b450 /include/qpdf/JSON.hh
parente5f3910c3ee1f6b779455fb1516ab3c985383d8e (diff)
downloadqpdf-05fda4afa289ef248804865d7648c9ac3ae75fbd.tar.zst
Change JSON parser to parse from an InputSource
Diffstat (limited to 'include/qpdf/JSON.hh')
-rw-r--r--include/qpdf/JSON.hh10
1 files changed, 7 insertions, 3 deletions
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 <vector>
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