【发布时间】:2017-05-05 17:16:05
【问题描述】:
如何在 Google Protocol Buffers 3.0 中处理继承?
Java 等效代码:
public class Bar {
String name;
}
public class Foo extends Bar {
String id;
}
什么是 Proto 等效代码?
message Bar {
string name = 1;
}
message Foo {
string id = 2;
}
【问题讨论】:
-
协议缓冲区不支持继承。看到这个stackoverflow.com/questions/29263507/…
标签: java protocol-buffers protocol-buffers-3