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

Function GetMapFieldKeyToString

internal/json.cc:150–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150MapFieldKeyToString GetMapFieldKeyToString(
151 const google::protobuf::FieldDescriptor* absl_nonnull field) {
152 switch (field->cpp_type()) {
153 case FieldDescriptor::CPPTYPE_BOOL:
154 return &BoolMapFieldKeyToString;
155 case FieldDescriptor::CPPTYPE_INT32:
156 return &Int32MapFieldKeyToString;
157 case FieldDescriptor::CPPTYPE_INT64:
158 return &Int64MapFieldKeyToString;
159 case FieldDescriptor::CPPTYPE_UINT32:
160 return &UInt32MapFieldKeyToString;
161 case FieldDescriptor::CPPTYPE_UINT64:
162 return &UInt64MapFieldKeyToString;
163 case FieldDescriptor::CPPTYPE_STRING:
164 return &StringMapFieldKeyToString;
165 default:
166 ABSL_UNREACHABLE();
167 }
168}
169
170using MapFieldValueToValue = absl::Status (MessageToJsonState::*)(
171 const google::protobuf::MapValueConstRef& value,

Callers 1

MessageMapFieldToJsonMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected