mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-20 22:31:23 +01:00
fix JSON stringify to escape special characters
When converting from non string types the converted string was not escaped
This commit is contained in:
parent
b69f3d1a4f
commit
a787b4f898
@ -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>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user