diff options
author | m-holger <m-holger@kubitscheck.org> | 2024-02-09 14:09:08 +0100 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2024-02-16 11:51:25 +0100 |
commit | e2737ab646bff6aa07ba72e0cc15cc955d9afcc0 (patch) | |
tree | 0ff6b1adb00694477e23e278055d61474d6b844a /libqpdf/QPDF_Operator.cc | |
parent | 9e90007a4a490dd1335b63079fc3e2a74420911f (diff) | |
download | qpdf-e2737ab646bff6aa07ba72e0cc15cc955d9afcc0.tar.zst |
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.
Diffstat (limited to 'libqpdf/QPDF_Operator.cc')
-rw-r--r-- | libqpdf/QPDF_Operator.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libqpdf/QPDF_Operator.cc b/libqpdf/QPDF_Operator.cc index d1b2969d..763c4f12 100644 --- a/libqpdf/QPDF_Operator.cc +++ b/libqpdf/QPDF_Operator.cc @@ -1,5 +1,7 @@ #include <qpdf/QPDF_Operator.hh> +#include <qpdf/JSON_writer.hh> + QPDF_Operator::QPDF_Operator(std::string const& val) : QPDFValue(::ot_operator, "operator"), val(val) @@ -29,3 +31,9 @@ QPDF_Operator::getJSON(int json_version) { return JSON::makeNull(); } + +void +QPDF_Operator::writeJSON(int json_version, JSON::Writer& p) +{ + p << "null"; +} |