diff --git a/protogen.hh b/protogen.hh index f99bd4e..f596b79 100644 --- a/protogen.hh +++ b/protogen.hh @@ -829,9 +829,7 @@ struct json case '\r': (*ctx.os) << "\\r"; break; case '\n': (*ctx.os) << "\\n"; break; case '\t': (*ctx.os) << "\\t"; break; - default: - // TODO: escape control character instead of removing it - if (*it >= 32) (*ctx.os) << *it; + default: (*ctx.os) << *it; } } (*ctx.os) << '"'; diff --git a/tests/tests.cc b/tests/tests.cc index 1817555..bafbca6 100644 --- a/tests/tests.cc +++ b/tests/tests.cc @@ -53,6 +53,8 @@ bool RUN_TEST1( int argc, char **argv) number.type = false; person.phones.push_back(number); + book.people.push_back(person); + std::string json1; std::string json2; phonebook::AddressBook temp;