.get<std::string> causing emdash errors #2180
Labels
kind: question
state: needs more info
the author of the issue needs to provide more details
state: stale
the issue has not been updated in a while and will be closed automatically soon unless it is updated
Not a very experienced programmer, but I've been putting together a small project using json files and encountered some issues with printing values from json. My code contains a number of conditionals similar to below, which are supposed to print out the value associated with a given key in a much larger json file. In this case, "type" is a key with an associated string value. However, when I run the program, the code prints out a small pile of random Unicode symbols instead of what's written in the json file. Is this something that is solvable, or is something wrong on my end?
if (unique.find("type") != unique.end()) { cout << unique["type"].get<std::string>() << endl; }
I've been building my code on Windows using Visual Studio 2019 16.3.10, and am currently using nlohmann json version 3.7.3.
Thanks, Julian Lane.
The text was updated successfully, but these errors were encountered: