If you want an array of mixed-type data, the best option in protobuf is 
something like this:

message Types {
  oneof types {
    Foo foo = 1;
    Bar bar = 2;

message Container {
  repeated Types list = 1;

On Thursday, February 11, 2016 at 10:43:10 AM UTC-8, Flo Loferer wrote:
> I have an array containing two different object types.
> Is there a chance to serialize this array with protobuf?
> What would the message definition look like?

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to