MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / ConvertToJsonArray

Method ConvertToJsonArray

common/values/parsed_repeated_field_value.cc:91–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91absl::Status ParsedRepeatedFieldValue::ConvertToJsonArray(
92 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
93 google::protobuf::MessageFactory* absl_nonnull message_factory,
94 google::protobuf::Message* absl_nonnull json) const {
95 ABSL_DCHECK(descriptor_pool != nullptr);
96 ABSL_DCHECK(message_factory != nullptr);
97 ABSL_DCHECK(json != nullptr);
98 ABSL_DCHECK_EQ(json->GetDescriptor()->well_known_type(),
99 google::protobuf::Descriptor::WELLKNOWNTYPE_LISTVALUE);
100 ABSL_DCHECK(*this);
101
102 json->Clear();
103
104 if (ABSL_PREDICT_FALSE(field_ == nullptr)) {
105 return absl::OkStatus();
106 }
107 return internal::MessageFieldToJson(*message_, field_, descriptor_pool,
108 message_factory, json);
109}
110
111absl::Status ParsedRepeatedFieldValue::Equal(
112 const Value& other,

Callers

nothing calls this directly

Calls 3

MessageFieldToJsonFunction · 0.85
GetDescriptorMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected