diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-05-07 00:40:07 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-05-07 14:26:31 +0200 |
commit | 1615d7feafe37dac5ce325f794605b9a59b51a20 (patch) | |
tree | f1a5e3a922b094c65045cf253c6475c8fe456620 /include | |
parent | dc9b7287cd02bc5198cc3f0bed9aab0b9554b5ca (diff) | |
download | qpdf-1615d7feafe37dac5ce325f794605b9a59b51a20.tar.zst |
Make JSON::writeNext public
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/JSON.hh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/qpdf/JSON.hh b/include/qpdf/JSON.hh index 4f4162fc..a1a61ee4 100644 --- a/include/qpdf/JSON.hh +++ b/include/qpdf/JSON.hh @@ -95,6 +95,13 @@ class JSON QPDF_DLL static void writeArrayItem( Pipeline*, bool& first, JSON const& element, size_t depth = 0); + // If writing nested structures incrementally, call writeNext + // before opening a new array or container in the midst of an + // existing one. The first you pass to writeNext should be the one + // for the parent object. Then start a new first for the nested + // item. + QPDF_DLL + static void writeNext(Pipeline* p, bool& first, size_t depth); // The JSON spec calls dictionaries "objects", but that creates // too much confusion when referring to instances of the JSON @@ -282,7 +289,6 @@ class JSON static void writeClose(Pipeline* p, bool first, size_t depth, char const* delimeter); static void writeIndent(Pipeline* p, size_t depth); - static void writeNext(Pipeline* p, bool& first, size_t depth); struct JSON_value { |