| 3591 | bool Value::isValidIndex(ArrayIndex index) const { return index < size(); } |
| 3592 | |
| 3593 | Value const* Value::find(char const* key, char const* cend) const { |
| 3594 | JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == objectValue, |
| 3595 | "in Json::Value::find(key, end, found): requires " |
| 3596 | "objectValue or nullValue"); |
| 3597 | if (type_ == nullValue) |
| 3598 | return NULL; |
| 3599 | CZString actualKey(key, static_cast<unsigned>(cend - key), |
| 3600 | CZString::noDuplication); |
| 3601 | ObjectValues::const_iterator it = value_.map_->find(actualKey); |
| 3602 | if (it == value_.map_->end()) |
| 3603 | return NULL; |
| 3604 | return &(*it).second; |
| 3605 | } |
| 3606 | const Value& Value::operator[](const char* key) const { |
| 3607 | Value const* found = find(key, key + strlen(key)); |
| 3608 | if (!found) |