From 3b4677e4c06ad64056587911e690dfd549d83358 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 7 Apr 2011 10:14:02 +0100 Subject: [PATCH] Fix json output. --- json.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.45.2