-
Perhaps this is in the exception handling documentation somewhere, but I wasn't able to find a specific answer to this - what happens if a value isn't found? Is there a default that would be returned? For example, I have several functions that I want to call after reading an object out of JSON, but not all of the functions have values that I need to set, they can be zeros or nulls. So if the DOM returns a zero for element["thing"].get() if the element doesn't exist in the JSON, that's fine. Can you elaborate what might happen in this scenario? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There are multiple ways, see https://json.nlohmann.me/features/element_access/. |
Beta Was this translation helpful? Give feedback.
There are multiple ways, see https://json.nlohmann.me/features/element_access/.