-
assuming I have a field called "aaa" that does not always exist in my json, is there a different way to access it other than the following: |
Beta Was this translation helpful? Give feedback.
Answered by
nlohmann
Jun 16, 2021
Replies: 1 comment
-
For this use case, you can use the int a = req_json.value("aaa", 0); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
nlohmann
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For this use case, you can use the
value
function (https://json.nlohmann.me/api/basic_json/value/):