aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-07 00:25:59 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-07 14:26:31 +0200
commitdc9b7287cd02bc5198cc3f0bed9aab0b9554b5ca (patch)
tree9816c08213b1bf33bcdf554445936773ff1b914f /include
parent7f65a5c21f83df31f3732532f0d836f32c982d67 (diff)
downloadqpdf-dc9b7287cd02bc5198cc3f0bed9aab0b9554b5ca.tar.zst
Top-level json: write incrementally
This commit just changes the order in which fields are written to the json without changing their content. All the json files in the test suite were modified with this script to ensure that we didn't get any changes other than ordering. ---------- #!/usr/bin/env python3 import json import sys def json_dumps(data): return json.dumps(data, ensure_ascii=False, indent=2, separators=(',', ': ')) for filename in sys.argv[1:]: with open(filename, 'r') as f: data = json.loads(f.read()) newdata = {} for i in ('version', 'parameters', 'pages', 'pagelabels', 'acroform', 'attachments', 'encrypt', 'outlines', 'objects', 'objectinfo'): if i in data: newdata[i] = data[i] print(json_dumps(newdata)) ----------
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFJob.hh16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh
index 2f9d1984..352348ab 100644
--- a/include/qpdf/QPDFJob.hh
+++ b/include/qpdf/QPDFJob.hh
@@ -512,14 +512,14 @@ class QPDFJob
// JSON
void doJSON(QPDF& pdf, Pipeline*);
std::set<QPDFObjGen> getWantedJSONObjects();
- void doJSONObjects(QPDF& pdf, JSON& j);
- void doJSONObjectinfo(QPDF& pdf, JSON& j);
- void doJSONPages(QPDF& pdf, JSON& j);
- void doJSONPageLabels(QPDF& pdf, JSON& j);
- void doJSONOutlines(QPDF& pdf, JSON& j);
- void doJSONAcroform(QPDF& pdf, JSON& j);
- void doJSONEncrypt(QPDF& pdf, JSON& j);
- void doJSONAttachments(QPDF& pdf, JSON& j);
+ void doJSONObjects(Pipeline* p, bool& first, QPDF& pdf);
+ void doJSONObjectinfo(Pipeline* p, bool& first, QPDF& pdf);
+ void doJSONPages(Pipeline* p, bool& first, QPDF& pdf);
+ void doJSONPageLabels(Pipeline* p, bool& first, QPDF& pdf);
+ void doJSONOutlines(Pipeline* p, bool& first, QPDF& pdf);
+ void doJSONAcroform(Pipeline* p, bool& first, QPDF& pdf);
+ void doJSONEncrypt(Pipeline* p, bool& first, QPDF& pdf);
+ void doJSONAttachments(Pipeline* p, bool& first, QPDF& pdf);
enum remove_unref_e { re_auto, re_yes, re_no };