From bb96499b613265b3d9cf2146af09283a4b99ef13 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 24 Jul 2022 16:54:48 -0400 Subject: Update docs and prepare QPDF::writeJSON for changes Add additional parameters that will be needed to call QPDF::writeJSON in partial mode. --- TODO | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) (limited to 'TODO') diff --git a/TODO b/TODO index d46a2821..61de004d 100644 --- a/TODO +++ b/TODO @@ -69,24 +69,9 @@ Soon: Break ground on "Document-level work" JSON v2 fixes ============= -* Get rid of separate format for --json and --json-output. Instead, - --json-output can just require an outfile and change some defaults - like which keys are present and json-stream-data. This makes it - easier to support use cases like being able to use information in - other top-level keys ("pages", "attachments", etc.) to drive - modifications made to objects without having to run qpdf twice. I - think --json-output should make the default key be only "qpdf" and - the default json-stream-data mode be inline, but make it so you can - use --json-stream-data and --json-stream-prefix with --json and - --json-keys with --json-output. These would be exactly the same: - - --json-output --json-keys=all - - --json --json-stream-data=inline - - And these: - - --json-output - - --json --json-stream-data=inline --json-key=qpdf +* Unify code between QPDFJob::doJSONObjects and QPDF::writeJSON. Make + sure that the "qpdf" key is always present when json-output is + specified. * Change the name of the "qpdf-v2" key to "qpdf". Use that in place of "objects" and change its content to a two-element array whose first @@ -114,9 +99,10 @@ JSON v2 fixes This implies a few things: - * QPDF::writeJSON will have to take an argument indicating whether - additional keys are being written which determines whether it - outputs the outer braces or not. + * Fix --json-help + + * --json-key=objects is only valid for v1. --json-key=qpdf is only + valid for v2. * This changes the policy about additional extra keys. Have a guarantee that qpdf will never add a key whose name is or starts -- cgit v1.2.3-54-g00ecf