chore: use SerializeToString instead of explicit Streams
@@ -238,9 +238,7 @@ absl::Status ParseFromJsonString(absl::string_view input,
void PackAny(const google::protobuf::Message& message,
absl::string_view type_uri, google::protobuf::Any* out) {
out->set_type_url(type_uri.data(), type_uri.size());
- google::protobuf::io::StringOutputStream stream(out->mutable_value());
- google::protobuf::io::CodedOutputStream coded_output_stream(&stream);
- message.SerializeToCodedStream(&coded_output_stream);
+ message.SerializeToString(out->mutable_value());
}
bool UnpackAny(const google::protobuf::Any& any,
