summaryrefslogtreecommitdiff
path: root/libs/util/src/JSonWriter.cc
diff options
context:
space:
mode:
authorgeronimo <geronimo013@gmx.de>2012-08-04 09:10:44 (GMT)
committergeronimo <geronimo013@gmx.de>2012-08-04 09:10:44 (GMT)
commite8175c7b23047fefd52f85afe05e2864b2a9bba8 (patch)
tree8dab4e287545805d173a6c8e297c1798a1a01599 /libs/util/src/JSonWriter.cc
parentc7d67f443bdfe842c2e356d4edbe345338e3e08d (diff)
downloadcmp-e8175c7b23047fefd52f85afe05e2864b2a9bba8.tar.gz
cmp-e8175c7b23047fefd52f85afe05e2864b2a9bba8.tar.bz2
created new icons to enable visual feedback on mediatype selection, changed json-parser and enabled virtual mediatype usage
Diffstat (limited to 'libs/util/src/JSonWriter.cc')
-rw-r--r--libs/util/src/JSonWriter.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/util/src/JSonWriter.cc b/libs/util/src/JSonWriter.cc
index ec9b1dc..8fcb140 100644
--- a/libs/util/src/JSonWriter.cc
+++ b/libs/util/src/JSonWriter.cc
@@ -28,6 +28,9 @@
#include <stdio.h>
#define DEBUG 1
+static const char char2Replace[] = { '"', '\0' };
+static const char *replacements[] = { "\\\"", NULL };
+
cJSonWriter::cJSonWriter(cStringBuilder &StringBuilder)
: lastState(JS_Unknown)
, sb(StringBuilder)
@@ -130,7 +133,7 @@ cJSonWriter &cJSonWriter::Value(const char *Text) {
}
else {
PopState();
- sb.Append("\"").Append(Text).Append("\"");
+ sb.Append("\"").Append(Text, char2Replace, replacements).Append("\"");
}
return *this;
}