added Var::isBoolean() and fixed JSON stringifier

This commit is contained in:
Guenter Obiltschnig
2014-09-18 20:57:34 +02:00
parent 65628a6f60
commit f2512856ee
3 changed files with 106 additions and 0 deletions

View File

@@ -55,6 +55,10 @@ void Stringifier::stringify(const Var& any, std::ostream& out, unsigned int inde
{
out << "null";
}
else if ( any.isNumeric() || any.isBoolean() )
{
out << any.convert<std::string>();
}
else
{
std::string value = any.convert<std::string>();