check the existence of an element in a JSON object given a JSON pointer
Declared in <nlohmann/json.hpp>
template<typename BasicJsonType>
requires detail::is_basic_json<BasicJsonType>::value
[[deprecated]]
bool
contains(nlohmann::json_pointer<BasicJsonType> const& ptr) const;
Deprecated: Since 3.11.0; use basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>. Use of this entity is allowed but discouraged.
whether the JSON pointer resolves to an existing element
| Name | Description |
|---|---|
| ptr | JSON pointer to the element to check for |