Commit 3440ea7d3ca0bfb5d6fb4d7392b61017cb36bf0a
1 parent
2e2223ff
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.)
Showing
4 changed files
with
6 additions
and
6 deletions
include/qpdf/JSON.hh
libqpdf/JSON.cc
libtests/json.cc
| ... | ... | @@ -5,9 +5,9 @@ |
| 5 | 5 | |
| 6 | 6 | static void check(JSON& j, std::string const& exp) |
| 7 | 7 | { |
| 8 | - if (exp != j.serialize()) | |
| 8 | + if (exp != j.unparse()) | |
| 9 | 9 | { |
| 10 | - std::cout << "Got " << j.serialize() << "; wanted " << exp << "\n"; | |
| 10 | + std::cout << "Got " << j.unparse() << "; wanted " << exp << "\n"; | |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | ... | ... |
qpdf/qpdf.cc
| ... | ... | @@ -851,7 +851,7 @@ ArgParser::argJsonHelp() |
| 851 | 851 | << "and \"parameters\" keys will always be present." |
| 852 | 852 | << std::endl |
| 853 | 853 | << std::endl |
| 854 | - << json_schema().serialize() | |
| 854 | + << json_schema().unparse() | |
| 855 | 855 | << std::endl; |
| 856 | 856 | } |
| 857 | 857 | |
| ... | ... | @@ -3055,7 +3055,7 @@ ideally with the file that caused the error and the output below. Thanks!\n\ |
| 3055 | 3055 | } |
| 3056 | 3056 | } |
| 3057 | 3057 | |
| 3058 | - std::cout << j.serialize() << std::endl; | |
| 3058 | + std::cout << j.unparse() << std::endl; | |
| 3059 | 3059 | } |
| 3060 | 3060 | |
| 3061 | 3061 | static void do_inspection(QPDF& pdf, Options& o) | ... | ... |