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