| 224 | } |
| 225 | |
| 226 | absl::StatusOr<bool> ParsedJsonMapValue::Find( |
| 227 | const Value& key, |
| 228 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 229 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 230 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const { |
| 231 | if (key.IsError() || key.IsUnknown()) { |
| 232 | *result = key; |
| 233 | return false; |
| 234 | } |
| 235 | if (value_ != nullptr) { |
| 236 | if (auto string_key = key.AsString(); string_key) { |
| 237 | if (ABSL_PREDICT_FALSE(value_ == nullptr)) { |
| 238 | *result = NullValue(); |
| 239 | return false; |
| 240 | } |
| 241 | std::string key_scratch; |
| 242 | if (const auto* value = |
| 243 | well_known_types::GetStructReflectionOrDie( |
| 244 | value_->GetDescriptor()) |
| 245 | .FindField(*value_, string_key->NativeString(key_scratch)); |
| 246 | value != nullptr) { |
| 247 | *result = common_internal::ParsedJsonValue(value, arena); |
| 248 | return true; |
| 249 | } |
| 250 | *result = NullValue(); |
| 251 | return false; |
| 252 | } |
| 253 | } |
| 254 | *result = NullValue(); |
| 255 | return false; |
| 256 | } |
| 257 | |
| 258 | absl::Status ParsedJsonMapValue::Has( |
| 259 | const Value& key, |
nothing calls this directly
no test coverage detected