-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Milestone
Description
Describe the bug
Poco::JSON::Object::Ptr obj = new Poco::JSON::Object();
// set some enum value
obj->set("taskType", SOME_ENUM_VALUE);
Poco::Dynamic::Var var(obj);
std::string result = var.convert<std::string>();
got exception:
poco got exception: Can not convert to std::string
if changed to this:
obj->set("taskType", int(SOME_ENUM_VALUE));
it works fine.
To Reproduce
always failed
Expected behavior
json convert ok
Logs
poco got exception: Can not convert to std::string
Please add relevant environment information:
- Win 10 x64 19044.3693
- 1.12.4
Additional context
none
Metadata
Metadata
Assignees
Type
Projects
Status
Done