Skip to content

json object from const char* #4130

Answered by nlohmann
Kolhun asked this question in Q&A
Discussion options

You must be logged in to vote

operator[] returns a reference to basic_json which is nothing print can print. Try array["name"].get_ref<std::string&>.c_str().

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Kolhun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants