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

Function ValueToJsonString

common/values/value_builder.cc:795–803  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

793}
794
795absl::StatusOr<std::string> ValueToJsonString(const Value& value) {
796 switch (value.kind()) {
797 case ValueKind::kString:
798 return value.GetString().NativeString();
799 default:
800 return TypeConversionError(value.GetRuntimeType(), StringType())
801 .ToStatus();
802 }
803}
804
805template <typename Map>
806absl::Status MapValueToJsonObject(

Callers

nothing calls this directly

Calls 6

TypeConversionErrorFunction · 0.85
StringTypeClass · 0.50
kindMethod · 0.45
GetStringMethod · 0.45
ToStatusMethod · 0.45
GetRuntimeTypeMethod · 0.45

Tested by

no test coverage detected