Add comment to QPDF_Name::writeJSON

This commit is contained in:
m-holger 2024-02-17 14:58:48 +00:00
parent 4f54508f7f
commit 413aba5bf2
1 changed files with 3 additions and 1 deletions

View File

@ -106,6 +106,8 @@ QPDF_Name::analyzeJSONEncoding(const std::string& name)
void
QPDF_Name::writeJSON(int json_version, JSON::Writer& p)
{
// For performance reasons this code is duplicated in QPDF_Dictionary::writeJSON. When updating
// this method make sure QPDF_Dictionary is also update.
if (json_version == 1) {
p << "\"" << JSON::Writer::encode_string(normalizeName(name)) << "\"";
} else {