aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Dictionary.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-18 01:18:02 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-20 15:16:25 +0200
commit0fe8d4476205c97e402e555aac41a88e70e3e9b2 (patch)
tree87c9ee190bdfe4deeb8c517a3da6ab6b2a2230eb /libqpdf/QPDF_Dictionary.cc
parent63c7eefe9db8d8e87d07198355627af01cc1814d (diff)
downloadqpdf-0fe8d4476205c97e402e555aac41a88e70e3e9b2.tar.zst
Support stream data -- not tested
There are no automated tests yet, but committing work so far in preparation for some refactoring.
Diffstat (limited to 'libqpdf/QPDF_Dictionary.cc')
-rw-r--r--libqpdf/QPDF_Dictionary.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/libqpdf/QPDF_Dictionary.cc b/libqpdf/QPDF_Dictionary.cc
index 67d59a2d..26239317 100644
--- a/libqpdf/QPDF_Dictionary.cc
+++ b/libqpdf/QPDF_Dictionary.cc
@@ -37,9 +37,10 @@ QPDF_Dictionary::getJSON(int json_version)
JSON j = JSON::makeDictionary();
for (auto& iter: this->items) {
if (!iter.second.isNull()) {
- j.addDictionaryMember(
- QPDF_Name::normalizeName(iter.first),
- iter.second.getJSON(json_version));
+ std::string key =
+ (json_version == 1 ? QPDF_Name::normalizeName(iter.first)
+ : iter.first);
+ j.addDictionaryMember(key, iter.second.getJSON(json_version));
}
}
return j;