From e2737ab646bff6aa07ba72e0cc15cc955d9afcc0 Mon Sep 17 00:00:00 2001 From: m-holger Date: Fri, 9 Feb 2024 13:09:08 +0000 Subject: Add new writeJSON methods Create an alternative to getJSON to allow an object handle to be written as JSON without the overhead of creating a JSON object. --- libqpdf/QPDF_Destroyed.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libqpdf/QPDF_Destroyed.cc') diff --git a/libqpdf/QPDF_Destroyed.cc b/libqpdf/QPDF_Destroyed.cc index 4e34b508..06d1a83c 100644 --- a/libqpdf/QPDF_Destroyed.cc +++ b/libqpdf/QPDF_Destroyed.cc @@ -34,3 +34,9 @@ QPDF_Destroyed::getJSON(int json_version) throw std::logic_error("attempted to get JSON from a QPDFObjectHandle from a destroyed QPDF"); return JSON::makeNull(); } + +void +QPDF_Destroyed::writeJSON(int json_version, JSON::Writer& p) +{ + throw std::logic_error("attempted to get JSON from a QPDFObjectHandle from a destroyed QPDF"); +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf