Browse Source

Do not escape '/' when writing json

Ivan Savenko 1 year ago
parent
commit
a2b8eaf7fb
1 changed files with 2 additions and 3 deletions
  1. 2 3
      lib/json/JsonWriter.cpp

+ 2 - 3
lib/json/JsonWriter.cpp

@@ -63,9 +63,8 @@ void JsonWriter::writeEntry(JsonVector::const_iterator entry)
 
 void JsonWriter::writeString(const std::string &string)
 {
-	static const std::string escaped = "\"\\\b\f\n\r\t/";
-
-	static const std::array<char, 8> escaped_code = {'\"', '\\', 'b', 'f', 'n', 'r', 't', '/'};
+	static const std::string escaped = "\"\\\b\f\n\r\t";
+	static const std::array escaped_code = {'\"', '\\', 'b', 'f', 'n', 'r', 't'};
 
 	out <<'\"';
 	size_t pos = 0;