aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/JSON.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-07 00:40:07 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-07 14:26:31 +0200
commit1615d7feafe37dac5ce325f794605b9a59b51a20 (patch)
treef1a5e3a922b094c65045cf253c6475c8fe456620 /include/qpdf/JSON.hh
parentdc9b7287cd02bc5198cc3f0bed9aab0b9554b5ca (diff)
downloadqpdf-1615d7feafe37dac5ce325f794605b9a59b51a20.tar.zst
Make JSON::writeNext public
Diffstat (limited to 'include/qpdf/JSON.hh')
-rw-r--r--include/qpdf/JSON.hh8
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
{