mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 10:09:36 +02:00
Poco::JSON::PrintHandler not working for objects in array #766
This commit is contained in:
@@ -1181,6 +1181,45 @@ void JSONTest::testPrintHandler()
|
||||
" ]\n"
|
||||
"}"
|
||||
);
|
||||
|
||||
json =
|
||||
"{"
|
||||
"\"array\":"
|
||||
"["
|
||||
"{"
|
||||
"\"key1\":"
|
||||
"["
|
||||
"1,2,3,"
|
||||
"{"
|
||||
"\"subkey\":"
|
||||
"\"test\""
|
||||
"}"
|
||||
"]"
|
||||
"},"
|
||||
"{"
|
||||
"\"key2\":"
|
||||
"{"
|
||||
"\"anotherSubKey\":"
|
||||
"["
|
||||
"1,"
|
||||
"{"
|
||||
"\"subSubKey\":"
|
||||
"["
|
||||
"4,5,6"
|
||||
"]"
|
||||
"}"
|
||||
"]"
|
||||
"}"
|
||||
"}"
|
||||
"]"
|
||||
"}";
|
||||
|
||||
|
||||
ostr.str("");
|
||||
pHandler->setIndent(0);
|
||||
parser.reset();
|
||||
parser.parse(json);
|
||||
assert (json == ostr.str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user