mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 08:31:43 +02:00
Poco::JSON::PrintHandler not working for nested arrays #782
This commit is contained in:
@@ -1220,6 +1220,21 @@ void JSONTest::testPrintHandler()
|
||||
parser.reset();
|
||||
parser.parse(json);
|
||||
assert (json == ostr.str());
|
||||
|
||||
json="[[\"a\"],[\"b\"],[[\"c\"],[\"d\"]]]";
|
||||
ostr.str("");
|
||||
pHandler->setIndent(0);
|
||||
parser.reset();
|
||||
parser.parse(json);
|
||||
assert (json == ostr.str());
|
||||
|
||||
json="[{\"1\":\"one\",\"0\":[\"zero\",\"nil\"]}]";
|
||||
ostr.str("");
|
||||
pHandler->setIndent(0);
|
||||
parser.reset();
|
||||
parser.parse(json);
|
||||
assert (json == ostr.str());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user