aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--TODO2
-rw-r--r--libqpdf/QPDFJob_config.cc5
-rw-r--r--manual/release-notes.rst7
4 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 994b8263..ef6fd504 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2022-04-16 Jay Berkenbilt <ejb@ql.org>
+ * Breaking CLI change: the default value for --json is now
+ "latest" rather than "1". At this moment, "1" is the latest
+ version, but version "2" will be added before the release of
+ qpdf 11.
+
* Perform code cleanup including some source-compatible but not
binary compatible changes to function signatures.
diff --git a/TODO b/TODO
index 0309603a..6fe07fef 100644
--- a/TODO
+++ b/TODO
@@ -6,7 +6,6 @@ Next
* Stay on top of https://github.com/pikepdf/pikepdf/pull/315
In order:
-* ABI including --json default is latest
* json v2
Other (do in any order):
@@ -480,7 +479,6 @@ This is a list of changes to make next time there is an ABI change.
Comments appear in the code prefixed by "ABI"
* Search for ABI to find items not listed here.
-* Switch default --json to latest
* See where anonymous namespaces can be used to keep things private to
a source file. Search for `(class|struct)` in **/*.cc.
* After removing legacy QPDFNameTreeObjectHelper and
diff --git a/libqpdf/QPDFJob_config.cc b/libqpdf/QPDFJob_config.cc
index 6d4bf933..032a6492 100644
--- a/libqpdf/QPDFJob_config.cc
+++ b/libqpdf/QPDFJob_config.cc
@@ -234,10 +234,7 @@ QPDFJob::Config::json()
QPDFJob::Config*
QPDFJob::Config::json(std::string const& parameter)
{
- if (parameter.empty()) {
- // The default value is 1 for backward compatibility.
- o.m->json_version = 1;
- } else if (parameter == "latest") {
+ if (parameter.empty() || (parameter == "latest")) {
o.m->json_version = 1;
} else {
o.m->json_version = QUtil::string_to_int(parameter.c_str());
diff --git a/manual/release-notes.rst b/manual/release-notes.rst
index c52a7710..8a8c6058 100644
--- a/manual/release-notes.rst
+++ b/manual/release-notes.rst
@@ -57,6 +57,13 @@ For a detailed list of changes, please see the file
``autopkgtest`` framework but can be used by others. See
:file:`pkg-test/README.md` for details.
+ - CLI: breaking changes
+
+ - The default json output version when :qpdf:ref:`--json` is
+ specified has been changed from ``1`` to ``latest``.
+
+ - API: breaking changes
+
- Other changes
- A new chapter on contributing to qpdf has been added to the