Commit 33b639a0df142f9f405878774cb15a8927a9e013
Committed by
GitHub
Merge pull request #1370 from m-holger/js
Tune JSON::JSON_string
Showing
2 changed files
with
2 additions
and
4 deletions
include/qpdf/JSON.hh
libqpdf/JSON.cc
| ... | ... | @@ -120,15 +120,14 @@ JSON::JSON_array::write(Pipeline* p, size_t depth) const |
| 120 | 120 | |
| 121 | 121 | JSON::JSON_string::JSON_string(std::string const& utf8) : |
| 122 | 122 | JSON_value(vt_string), |
| 123 | - utf8(utf8), | |
| 124 | - encoded(Writer::encode_string(utf8)) | |
| 123 | + utf8(utf8) | |
| 125 | 124 | { |
| 126 | 125 | } |
| 127 | 126 | |
| 128 | 127 | void |
| 129 | 128 | JSON::JSON_string::write(Pipeline* p, size_t) const |
| 130 | 129 | { |
| 131 | - *p << std::string("\"") + encoded + "\""; | |
| 130 | + *p << std::string("\"") + Writer::encode_string(utf8) + "\""; | |
| 132 | 131 | } |
| 133 | 132 | |
| 134 | 133 | JSON::JSON_number::JSON_number(long long value) : | ... | ... |