mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-26 18:11:29 +02: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";
|
out << "null";
|
||||||
}
|
}
|
||||||
else if ( any.isString() )
|
else
|
||||||
{
|
{
|
||||||
std::string value = any.convert<std::string>();
|
std::string value = any.convert<std::string>();
|
||||||
formatString(value, out);
|
formatString(value, out);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
out << any.convert<std::string>();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user