fix JSON stringify to escape special characters

When converting from non string types the converted string was not escaped
This commit is contained in:
rafzi 2014-09-06 19:42:06 +02:00
parent b69f3d1a4f
commit a787b4f898

View File

@ -55,15 +55,11 @@ void Stringifier::stringify(const Var& any, std::ostream& out, unsigned int inde
{
out << "null";
}
else if ( any.isString() )
else
{
std::string value = any.convert<std::string>();
formatString(value, out);
}
else
{
out << any.convert<std::string>();
}
}