Re: [protobuf] he simple code bellow doesn't work. Is it the best way to use Any ? I'm just trying to read from/write to Any and identify the type stored by Any.

2015-07-14 Thread Edgard Lima
Thanks, works like a charm! On Monday, July 6, 2015 at 6:13:33 PM UTC-3, Feng Xiao wrote: On Mon, Jul 6, 2015 at 11:23 AM, Edgard Lima edgar...@gmail.com javascript: wrote: // my .proto syntax = proto3;import google/protobuf/any.proto; message CommandListPrinters {} message Commands

Re: [protobuf] he simple code bellow doesn't work. Is it the best way to use Any ? I'm just trying to read from/write to Any and identify the type stored by Any.

2015-07-06 Thread 'Feng Xiao' via Protocol Buffers
On Mon, Jul 6, 2015 at 11:23 AM, Edgard Lima edgard.l...@gmail.com wrote: // my .proto syntax = proto3;import google/protobuf/any.proto; message CommandListPrinters {} message Commands { int32 id = 1; repeated google.protobuf.Any command = 2;} // my.java CommandListPrinters

[protobuf] he simple code bellow doesn't work. Is it the best way to use Any ? I'm just trying to read from/write to Any and identify the type stored by Any.

2015-07-06 Thread Edgard Lima
// my .proto syntax = proto3;import google/protobuf/any.proto; message CommandListPrinters {} message Commands { int32 id = 1; repeated google.protobuf.Any command = 2;} // my.java CommandListPrinters commandListPrinters = CommandListPrinters.newBuilder().build();Any any =