! @brief returns the number of occurrences of a key in a JSON object Returns the number of elements with key @a key. If ObjectType is the default `std::map` type, the return value will always be `0` (@a key was not found) or `1` (@a key was found). @param[in] key key value of the element to count @return Number of elements with key @a key. If the JSON value is not an
| 4259 | @since version 1.0.0 |
| 4260 | */ |
| 4261 | size_type count(typename object_t::key_type key) const |
| 4262 | { |
| 4263 | // return 0 for all nonobject types |
| 4264 | return is_object() ? m_value.object->count(key) : 0; |
| 4265 | } |
| 4266 | |
| 4267 | /// @} |
| 4268 |
no outgoing calls
no test coverage detected