-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Q: When I received an illegal string,How the program knows? #2162
Comments
You can use |
|
Instead of calling auto result = json::parse(body); do this: auto result = json::parse(body, nullptr, false); |
The content returned by this |
From the documentation:
|
value_t::discarded. In which file, how do I refer to this variable |
You can check with |
Thank you very much, I solved the problem. |
Sorry, I did not check my code example. This works: if (result.type() == nlohmann::json::value_t::discarded) {
std::cout << "nlohmann::json::value_t::discarded" << std::endl;
} |
Do you need further assistance with this issue? |
Thanks, this has satisfied my needs, let me close this issue |
how the program knows?
Of course, the premise is that the program cannot crash.
Thanks
The text was updated successfully, but these errors were encountered: