mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 19:51:58 +01:00
Only escape string values in Poco::JSON::Stringifier::stringify() #1027
This commit is contained in:
@@ -62,11 +62,15 @@ void Stringifier::stringify(const Var& any, std::ostream& out, unsigned int inde
|
||||
if (any.type() == typeid(char)) formatString(value, out);
|
||||
else out << value;
|
||||
}
|
||||
else
|
||||
else if (any.isString() || any.isDateTime() || any.isDate() || any.isTime())
|
||||
{
|
||||
std::string value = any.convert<std::string>();
|
||||
formatString(value, out);
|
||||
}
|
||||
else
|
||||
{
|
||||
out << any.convert<std::string>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user