You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allow_exceptions: whether to throw exceptions in case of a parse error (optional, true by default)
What happens if allow_exceptions is set to false and parsing fails (due to incorrect JSON string)? How is the returned basic_json? Is it something that can be checked with json::type() == json::value_t::null?
The text was updated successfully, but these errors were encountered:
You are right - the return value is not properly documented in this case. If allow_exceptions is false, then a discarded value is returned that can be checked with is_discarded(). Here is an example:
The
parse()
function says:What happens if
allow_exceptions
is set to false and parsing fails (due to incorrect JSON string)? How is the returnedbasic_json
? Is it something that can be checked withjson::type() == json::value_t::null
?The text was updated successfully, but these errors were encountered: