mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-21 06:37:42 +01:00
#3505: JSON::PrintHandler.value(bool) prints incorrect value
This commit is contained in:
parent
516eebad72
commit
00d5e7171a
@ -71,7 +71,7 @@ bool PrintHandler::printFlat() const
|
||||
unsigned PrintHandler::indent()
|
||||
{
|
||||
if (!printFlat()) return _indent;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -119,9 +119,9 @@ void PrintHandler::endArray()
|
||||
void PrintHandler::key(const std::string& k)
|
||||
{
|
||||
if (!_objStart) comma();
|
||||
|
||||
|
||||
_objStart = true;
|
||||
|
||||
|
||||
_out << _tab;
|
||||
Stringifier::formatString(k, _out, _options);
|
||||
if (!printFlat()) _out << ' ';
|
||||
@ -191,7 +191,7 @@ void PrintHandler::value(double d)
|
||||
void PrintHandler::value(bool b)
|
||||
{
|
||||
arrayValue();
|
||||
_out << b;
|
||||
_out << (b ? "true" : "false");
|
||||
_objStart = false;
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ void PrintHandler::comma()
|
||||
void PrintHandler::arrayValue()
|
||||
{
|
||||
if (!_objStart) comma();
|
||||
if (array())
|
||||
if (array())
|
||||
{
|
||||
_out << _tab;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user