-
I was trying to write something like this: const json& foo = data["foo"];
if (!foo.is_null())
{
...
} Where This works well for non-const objects, but in this case it leads to abort. Is there any good solution for that? |
Beta Was this translation helpful? Give feedback.
Answered by
nlohmann
May 15, 2021
Replies: 1 comment 4 replies
-
Use at() or contains(). |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
nlohmann
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use at() or contains().