-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
kind: questionsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
Description
Hi, I am getting
[json.exception.type_error.304] cannot use at() with object
Which doesn't make sense to me, since I figured thats what at() is for.
What does this error mean? Printing my json object it seems to look like a normal json string.
Code:
std::stringstream ss;
// msgpack object
ss << obj;
std::cout << ss.str();
// {"subject":"set_detection_mapping_mode", "mode":"3d"}
std::string str;
try {
auto j = json::parse(ss.str().c_str());
str = j.at('subject').get<std::string>();
} catch (detail::type_error &e) {
std::cout << e.what();
// [json.exception.type_error.304] cannot use at() with object
}
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind: questionsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation