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

Function MessageToJson

internal/json.cc:1187–1199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1185} // namespace
1186
1187absl::Status MessageToJson(
1188 const google::protobuf::Message& message,
1189 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
1190 google::protobuf::MessageFactory* absl_nonnull message_factory,
1191 google::protobuf::Value* absl_nonnull result) {
1192 ABSL_DCHECK(descriptor_pool != nullptr);
1193 ABSL_DCHECK(message_factory != nullptr);
1194 ABSL_DCHECK(result != nullptr);
1195 auto state = std::make_unique<GeneratedMessageToJsonState>(descriptor_pool,
1196 message_factory);
1197 CEL_RETURN_IF_ERROR(state->Initialize(result));
1198 return state->ToJson(message, result);
1199}
1200
1201absl::Status MessageToJson(
1202 const google::protobuf::Message& message,

Callers 7

TEST_FFunction · 0.85
ToJsonMethod · 0.85
ToJsonObjectMethod · 0.85
ConvertToJsonMethod · 0.85
ConvertToJsonObjectMethod · 0.85
ConvertToJsonMethod · 0.85
ConvertToJsonObjectMethod · 0.85

Calls 4

ToJsonMethod · 0.80
ToJsonObjectMethod · 0.80
InitializeMethod · 0.45
GetDescriptorMethod · 0.45

Tested by 1

TEST_FFunction · 0.68