From 3440ea7d3ca0bfb5d6fb4d7392b61017cb36bf0a Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 25 Dec 2018 08:29:07 -0500 Subject: [PATCH] JSON::serialize -> unparse --- include/qpdf/JSON.hh | 2 +- libqpdf/JSON.cc | 2 +- libtests/json.cc | 4 ++-- qpdf/qpdf.cc | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/qpdf/JSON.hh b/include/qpdf/JSON.hh index f5dd57d..78f5cc0 100644 --- a/include/qpdf/JSON.hh +++ b/include/qpdf/JSON.hh @@ -41,7 +41,7 @@ class JSON { public: QPDF_DLL - std::string serialize() const; + std::string unparse() const; // The JSON spec calls dictionaries "objects", but that creates // too much confusion when referring to instances of the JSON diff --git a/libqpdf/JSON.cc b/libqpdf/JSON.cc index def439c..df753b6 100644 --- a/libqpdf/JSON.cc +++ b/libqpdf/JSON.cc @@ -150,7 +150,7 @@ std::string JSON::JSON_null::unparse(size_t) const } std::string -JSON::serialize() const +JSON::unparse() const { if (0 == this->m->value.getPointer()) { diff --git a/libtests/json.cc b/libtests/json.cc index fb902c6..1a9123a 100644 --- a/libtests/json.cc +++ b/libtests/json.cc @@ -5,9 +5,9 @@ static void check(JSON& j, std::string const& exp) { - if (exp != j.serialize()) + if (exp != j.unparse()) { - std::cout << "Got " << j.serialize() << "; wanted " << exp << "\n"; + std::cout << "Got " << j.unparse() << "; wanted " << exp << "\n"; } } diff --git a/qpdf/qpdf.cc b/qpdf/qpdf.cc index 1a45180..2eb75af 100644 --- a/qpdf/qpdf.cc +++ b/qpdf/qpdf.cc @@ -851,7 +851,7 @@ ArgParser::argJsonHelp() << "and \"parameters\" keys will always be present." << std::endl << std::endl - << json_schema().serialize() + << json_schema().unparse() << std::endl; } @@ -3055,7 +3055,7 @@ ideally with the file that caused the error and the output below. Thanks!\n\ } } - std::cout << j.serialize() << std::endl; + std::cout << j.unparse() << std::endl; } static void do_inspection(QPDF& pdf, Options& o) -- libgit2 0.21.4