summaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFObjectHandle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r--libqpdf/QPDFObjectHandle.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc
index 05a0f30d..33155097 100644
--- a/libqpdf/QPDFObjectHandle.cc
+++ b/libqpdf/QPDFObjectHandle.cc
@@ -1775,9 +1775,16 @@ QPDFObjectHandle::unparseBinary()
}
}
+// Deprecated versionless getJSON to be removed in qpdf 12
JSON
QPDFObjectHandle::getJSON(bool dereference_indirect)
{
+ return getJSON(1, dereference_indirect);
+}
+
+JSON
+QPDFObjectHandle::getJSON(int json_version, bool dereference_indirect)
+{
if ((!dereference_indirect) && this->isIndirect()) {
return JSON::makeString(unparse());
} else {
@@ -1786,7 +1793,7 @@ QPDFObjectHandle::getJSON(bool dereference_indirect)
throw std::logic_error(
"QPDFObjectHandle: attempting to unparse a reserved object");
}
- return this->obj->getJSON();
+ return this->obj->getJSON(json_version);
}
}