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

Method ConvertToJson

common/values/int_value.cc:64–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64absl::Status IntValue::ConvertToJson(
65 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
66 google::protobuf::MessageFactory* absl_nonnull message_factory,
67 google::protobuf::Message* absl_nonnull json) const {
68 ABSL_DCHECK(descriptor_pool != nullptr);
69 ABSL_DCHECK(message_factory != nullptr);
70 ABSL_DCHECK(json != nullptr);
71 ABSL_DCHECK_EQ(json->GetDescriptor()->well_known_type(),
72 google::protobuf::Descriptor::WELLKNOWNTYPE_VALUE);
73
74 ValueReflection value_reflection;
75 CEL_RETURN_IF_ERROR(value_reflection.Initialize(json->GetDescriptor()));
76 value_reflection.SetNumberValue(json, NativeValue());
77
78 return absl::OkStatus();
79}
80
81absl::Status IntValue::Equal(
82 const Value& other,

Callers 15

SetSingularFieldMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
ListValueToJsonArrayFunction · 0.45
MapValueToJsonObjectFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 4

NativeValueFunction · 0.70
GetDescriptorMethod · 0.45
InitializeMethod · 0.45
SetNumberValueMethod · 0.45

Tested by 15

TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36