-
-
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
I was wondering if there was a way to get the underlying value of an object without explicit typecasting. Here is what I mean:
json j = R"({"int_type": 3})"_json;
auto i_what_is_this = j["int_type"];
// to get an int, I need to explicitly typecast
auto i_int = j["int_type"].get<int>();
JSON natively supports different types, so is there a way to use that underling type to get auto i = j["int_type"]; to be of type int without explicitly typecasting?
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