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

Method ConvertToJson

common/value.cc:147–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147absl::Status Value::ConvertToJson(
148 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
149 google::protobuf::MessageFactory* absl_nonnull message_factory,
150 google::protobuf::Message* absl_nonnull json) const {
151 ABSL_DCHECK(descriptor_pool != nullptr);
152 ABSL_DCHECK(message_factory != nullptr);
153 ABSL_DCHECK(json != nullptr);
154 ABSL_DCHECK_EQ(json->GetDescriptor()->well_known_type(),
155 google::protobuf::Descriptor::WELLKNOWNTYPE_VALUE);
156
157 return variant_.Visit([descriptor_pool, message_factory,
158 json](const auto& alternative) -> absl::Status {
159 return alternative.ConvertToJson(descriptor_pool, message_factory, json);
160 });
161}
162
163absl::Status Value::ConvertToJsonArray(
164 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,

Callers

nothing calls this directly

Calls 2

GetDescriptorMethod · 0.45
VisitMethod · 0.45

Tested by

no test coverage detected