You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[question] how to get a string value by pointer #683
Activity
zhishupp commentedon Aug 9, 2017
I find a way like this:
`
extern "C" const char*
get_json_string()
{
if (para["file"].is_string())
{
}
}
`
now I can get the correct data, is that right ?
and
get<json::string_t*>()->c_str(); or get_ptr<json::string_t*>()->c_str();which one is corret, or better ?
nlohmann commentedon Aug 9, 2017
You should use
get_ptrto be sure no copies are made:nlohmann commentedon Aug 10, 2017
Does this solve the issue?
zhishupp commentedon Aug 10, 2017
many thanks, issue has been solved ^^