Skip to content

Commit a787b4f

Browse files
committed
fix JSON stringify to escape special characters
When converting from non string types the converted string was not escaped
1 parent b69f3d1 commit a787b4f

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

JSON/src/Stringifier.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,11 @@ void Stringifier::stringify(const Var& any, std::ostream& out, unsigned int inde
5555
{
5656
out << "null";
5757
}
58-
else if ( any.isString() )
58+
else
5959
{
6060
std::string value = any.convert<std::string>();
6161
formatString(value, out);
6262
}
63-
else
64-
{
65-
out << any.convert<std::string>();
66-
}
6763
}
6864

6965

0 commit comments

Comments
 (0)