From 7e866396aa4fd23cdbdccf964c3b76f2a44d67c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Wed, 29 Jul 2020 08:59:44 +0200 Subject: [PATCH] remove unnecessary escaping in JSONString --- Foundation/src/JSONString.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Foundation/src/JSONString.cpp b/Foundation/src/JSONString.cpp index 16049765d..2e901a1e3 100644 --- a/Foundation/src/JSONString.cpp +++ b/Foundation/src/JSONString.cpp @@ -49,8 +49,7 @@ void writeString(const std::string &value, T& obj, typename WriteFunc::Typ { for(std::string::const_iterator it = value.begin(), end = value.end(); it != end; ++it) { - // Forward slash isn't strictly required by JSON spec, but some parsers expect it - if((*it >= 0 && *it <= 31) || (*it == '"') || (*it == '\\') || (*it == '/')) + if((*it >= 0 && *it <= 31) || (*it == '"') || (*it == '\\')) { std::string str = Poco::UTF8::escape(it, it + 1, true); (obj.*write)(str.c_str(), str.size());