diff options
Diffstat (limited to 'libqpdf/JSON.cc')
-rw-r--r-- | libqpdf/JSON.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libqpdf/JSON.cc b/libqpdf/JSON.cc index 31675a42..1c49f9ee 100644 --- a/libqpdf/JSON.cc +++ b/libqpdf/JSON.cc @@ -78,6 +78,14 @@ JSON::writeArrayClose(Pipeline* p, bool first, size_t depth) } void +JSON::writeDictionaryKey( + Pipeline* p, bool& first, std::string const& key, size_t depth) +{ + writeNext(p, first, depth); + *p << "\"" << key << "\": "; +} + +void JSON::writeDictionaryItem( Pipeline* p, bool& first, @@ -85,8 +93,7 @@ JSON::writeDictionaryItem( JSON const& value, size_t depth) { - writeNext(p, first, depth); - *p << "\"" << key << "\": "; + writeDictionaryKey(p, first, key, depth); value.write(p, 1 + depth); } |