mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-31 02:48:31 +00:00
JSON::serialize -> unparse
Unparse is admittedly strange, but I'd rather be strange and consistent, and everything else in the qpdf library uses unparse to serialize. (If you're reading this, the convention of using "unparse" comes from the "clu" programming language.)
This commit is contained in:
parent
2e2223ffe1
commit
3440ea7d3c
@ -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
|
||||
|
@ -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())
|
||||
{
|
||||
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user