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

Function MessageFieldToJson

internal/json.cc:1236–1250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1234}
1235
1236absl::Status MessageFieldToJson(
1237 const google::protobuf::Message& message,
1238 const google::protobuf::FieldDescriptor* absl_nonnull field,
1239 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
1240 google::protobuf::MessageFactory* absl_nonnull message_factory,
1241 google::protobuf::Value* absl_nonnull result) {
1242 ABSL_DCHECK_EQ(field->containing_type(), message.GetDescriptor());
1243 ABSL_DCHECK(descriptor_pool != nullptr);
1244 ABSL_DCHECK(message_factory != nullptr);
1245 ABSL_DCHECK(result != nullptr);
1246 auto state = std::make_unique<GeneratedMessageToJsonState>(descriptor_pool,
1247 message_factory);
1248 CEL_RETURN_IF_ERROR(state->Initialize(result));
1249 return state->FieldToJson(message, field, result);
1250}
1251
1252absl::Status MessageFieldToJson(
1253 const google::protobuf::Message& message,

Callers 9

TEST_FFunction · 0.85
FieldToJsonMethod · 0.85
MessageToJsonMethod · 0.85
SerializeToMethod · 0.85
ConvertToJsonMethod · 0.85
ConvertToJsonArrayMethod · 0.85
SerializeToMethod · 0.85
ConvertToJsonMethod · 0.85
ConvertToJsonObjectMethod · 0.85

Calls 5

FieldToJsonMethod · 0.80
FieldToJsonArrayMethod · 0.80
FieldToJsonObjectMethod · 0.80
GetDescriptorMethod · 0.45
InitializeMethod · 0.45

Tested by 1

TEST_FFunction · 0.68