| 912 | } |
| 913 | |
| 914 | absl::Status MessageToJson(const google::protobuf::Message& message, |
| 915 | google::protobuf::MessageLite* absl_nonnull result) { |
| 916 | std::vector<const google::protobuf::FieldDescriptor*> fields; |
| 917 | const auto* reflection = message.GetReflection(); |
| 918 | reflection->ListFields(message, &fields); |
| 919 | if (!fields.empty()) { |
| 920 | for (const auto* field : fields) { |
| 921 | CEL_RETURN_IF_ERROR(MessageFieldToJson( |
| 922 | message, field, InsertField(result, field->json_name()))); |
| 923 | } |
| 924 | } |
| 925 | return absl::OkStatus(); |
| 926 | } |
| 927 | |
| 928 | void StringValueToJson(const well_known_types::StringValue& value, |
| 929 | google::protobuf::MessageLite* absl_nonnull result) const { |
nothing calls this directly
no test coverage detected