| 3485 | bool Value::isValidIndex(ArrayIndex index) const { return index < size(); } |
| 3486 | |
| 3487 | Value const *Value::find(char const *begin, char const *end) const { |
| 3488 | JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue, |
| 3489 | "in Json::Value::find(begin, end): requires " |
| 3490 | "objectValue or nullValue"); |
| 3491 | if (type() == nullValue) |
| 3492 | return nullptr; |
| 3493 | CZString actualKey(begin, static_cast<unsigned>(end - begin), |
| 3494 | CZString::noDuplication); |
| 3495 | ObjectValues::const_iterator it = value_.map_->find(actualKey); |
| 3496 | if (it == value_.map_->end()) |
| 3497 | return nullptr; |
| 3498 | return &(*it).second; |
| 3499 | } |
| 3500 | Value *Value::demand(char const *begin, char const *end) { |
| 3501 | JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue, |
| 3502 | "in Json::Value::demand(begin, end): requires " |