-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Hello
I'm using Release version 1.5.1 compiled with Visual Studio 2005.
If i query an Object, the result is not as expected. If i make the same with a pointer to the object the result is as expected. The problem can be reproduced with the following sample code.
Poco::JSON::Object obj;
Poco::JSON::Object::Ptr pObj = &obj;
pObj->set("Id", 22);
//Query ok (Object::Ptr)
Poco::JSON::Query queryPointer(pObj);
Poco::Dynamic::Var idQueryPointer = queryPointer.find("Id");
int nIdPointer = idQueryPointer;
//Query fails (Object)
Poco::JSON::Query queryObj(obj);
Poco::Dynamic::Var idQueryObj = queryObj.find("Id");
int nIdObj = idQueryObj; //Throws BadCastException("Can not convert to Int32");Reactions are currently unavailable