summaryrefslogtreecommitdiff
path: root/src/support/json.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/json.cpp')
-rw-r--r--src/support/json.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/support/json.cpp b/src/support/json.cpp
index d43ac0323..ab55cc75f 100644
--- a/src/support/json.cpp
+++ b/src/support/json.cpp
@@ -15,13 +15,13 @@
*/
#include "support/json.h"
+#include "support/string.h"
namespace json {
void Value::stringify(std::ostream& os, bool pretty) {
if (isString()) {
- // TODO: escaping
- os << '"' << getCString() << '"';
+ wasm::String::printEscapedJSON(os, getCString());
} else if (isArray()) {
os << '[';
auto first = true;