mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-30 21:50:47 +01:00
limit allowed types for JSON Query
limited allowed types for JSON::Query to Object, Array, Object::Ptr, Array::Ptr and empty
This commit is contained in:
@@ -1096,6 +1096,14 @@ void JSONTest::testQuery()
|
||||
Query queryObj(*pObj);
|
||||
Var idQueryObj = queryObj.find("Id");
|
||||
assert (22 == idQueryObj);
|
||||
|
||||
Var bad = 1;
|
||||
try
|
||||
{
|
||||
Query badQuery(bad);
|
||||
fail ("must throw");
|
||||
}
|
||||
catch (Poco::InvalidArgumentException&) { }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user