access specified object element via JSON Pointer with default value
Declared in <nlohmann/json.hpp>
template<class ValueType>
requires detail::is_getable<basic_json_t, ValueType>::value
&& !std::is_same<value_t, detail::uncvref_t<ValueType>>::value
ValueType
value(
json_pointer const& ptr,
ValueType const& default_value) const;
value at ptr if found, otherwise default_value
| Name | Description |
|---|---|
| ptr | JSON pointer to the element to access |
| default_value | value to return if ptr does not resolve to a value |