I\'m trying to long-term serialize a bunch of objects related by a strong class hierarchy in java, and I\'d like to use protocol buffers to do it due to their simplicity, pe
A solution a little better, for me, that the @Łukasz Marciniak's answer.
If Bar extends Foo, simply write:
message Bar { optional Foo foo = 1; optional double aDouble = 2; } message Foo { optional string aString = 1; }
So if Foo evolves only Foo message is modified.