diff options
Diffstat (limited to 'libqpdf/QPDF_json.cc')
-rw-r--r-- | libqpdf/QPDF_json.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libqpdf/QPDF_json.cc b/libqpdf/QPDF_json.cc index 7951b1e4..33211f14 100644 --- a/libqpdf/QPDF_json.cc +++ b/libqpdf/QPDF_json.cc @@ -666,7 +666,9 @@ QPDF::JSONReactor::dictionaryItem(std::string const& key, JSON const& value) if (dict.isStream()) { dict = dict.getDict(); } - dict.replaceKey(key, makeObject(value)); + dict.replaceKey( + is_pdf_name(key) ? QPDFObjectHandle::parse(key.substr(2)).getName() : key, + makeObject(value)); } } else { throw std::logic_error("QPDF_json: unknown state " + std::to_string(state)); |