Only escape string values in Poco::JSON::Stringifier::stringify() #1027

This commit is contained in:
Alex Fabijanic
2016-04-23 14:52:03 -06:00
parent b14b6f3d7f
commit 0286d245ab
3 changed files with 56 additions and 22 deletions

View File

@@ -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>();
}
}