diff --git a/Foundation/src/Var.cpp b/Foundation/src/Var.cpp index ed95c0696..e29aa29d4 100644 --- a/Foundation/src/Var.cpp +++ b/Foundation/src/Var.cpp @@ -606,7 +606,6 @@ std::string Var::parseJSONString(const std::string& val, std::string::size_type& result += val[pos]; break; } - break; } else { diff --git a/Foundation/testsuite/src/VarTest.cpp b/Foundation/testsuite/src/VarTest.cpp index f54989e5d..3fe0db8cf 100644 --- a/Foundation/testsuite/src/VarTest.cpp +++ b/Foundation/testsuite/src/VarTest.cpp @@ -2622,6 +2622,10 @@ void VarTest::testJSONDeserializeString() tst = "{ \"a\" : \"1\", \"b\" : \"2\"\n}"; a = Var::parse(tst); assertTrue (a.toString() == "{ \"a\" : \"1\", \"b\" : \"2\" }"); + + tst = "{ \"message\" : \"escape\\b\\f\\n\\r\\t\", \"path\" : \"\\/dev\\/null\" }"; + a = Var::parse(tst); + assertTrue(a.toString() == "{ \"message\" : \"escape\\b\\f\\n\\r\\t\", \"path\" : \"\\/dev\\/null\" }"); }