| 46 | } |
| 47 | |
| 48 | absl::Status ParsedRepeatedFieldValue::SerializeTo( |
| 49 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 50 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 51 | google::protobuf::io::ZeroCopyOutputStream* absl_nonnull output) const { |
| 52 | ABSL_DCHECK(descriptor_pool != nullptr); |
| 53 | ABSL_DCHECK(message_factory != nullptr); |
| 54 | ABSL_DCHECK(output != nullptr); |
| 55 | ABSL_DCHECK(*this); |
| 56 | |
| 57 | if (ABSL_PREDICT_FALSE(field_ == nullptr)) { |
| 58 | return absl::OkStatus(); |
| 59 | } |
| 60 | // We have to convert to google.protobuf.Struct first. |
| 61 | google::protobuf::Value message; |
| 62 | CEL_RETURN_IF_ERROR(internal::MessageFieldToJson( |
| 63 | *message_, field_, descriptor_pool, message_factory, &message)); |
| 64 | if (!message.list_value().SerializePartialToZeroCopyStream(output)) { |
| 65 | return absl::UnknownError("failed to serialize google.protobuf.Struct"); |
| 66 | } |
| 67 | return absl::OkStatus(); |
| 68 | } |
| 69 | |
| 70 | absl::Status ParsedRepeatedFieldValue::ConvertToJson( |
| 71 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
nothing calls this directly
no test coverage detected