From: José Fonseca Date: Thu, 7 Apr 2011 09:14:02 +0000 (+0100) Subject: Fix json output. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=3b4677e4c06ad64056587911e690dfd549d83358;p=apitrace Fix json output. --- diff --git a/json.hpp b/json.hpp index 0bfbabf..feaf1ea 100644 --- a/json.hpp +++ b/json.hpp @@ -68,11 +68,11 @@ private: else if (c >= 0x20 && c <= 0x7e) os << c; else if (c == '\t') - os << "\\t"; + os << "\t"; else if (c == '\r') - os << "\\r"; + os << "\r"; else if (c == '\n') - os << " "; + os << "\n"; else { unsigned octal0 = c & 0x7; unsigned octal1 = (c >> 3) & 0x7; @@ -103,6 +103,7 @@ public: } inline void beginObject() { + separator(); os << "{"; ++level; value = false;