Poco::JSON::PrintHandler not working for objects in array #766

This commit is contained in:
Alex Fabijanic
2015-03-31 21:35:34 -05:00
parent 2feb15eb19
commit fea66f4dbc
3 changed files with 65 additions and 10 deletions

View File

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