Skip to content

Commit

Permalink
Merge pull request #281 from openzim/fix_json_log
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr authored Jan 13, 2022
2 parents d8279fd + 6515568 commit 3a9a989
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 114 deletions.
6 changes: 3 additions & 3 deletions src/zimcheck/json_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ void OutputStream::output(const char* s)
assert(!m_nesting.empty());
m_nesting.top().hasData = true;
auto& out = *m_out;
out << '\'';
out << '\"';
for (const char* p = s; *p; ++p) {
if (*p == '\'' || *p == '\\') {
if (*p == '\"' || *p == '\\') {
out << '\\' << *p;
} else if ( *p == '\n' ) {
out << "\\n";
} else {
out << *p;
}
}
out << '\'';
out << '\"';
}

void OutputStream::output(StartObject)
Expand Down
Loading

0 comments on commit 3a9a989

Please sign in to comment.