Re: [protobuf] Re: How to check empty message object

2015-09-17 Thread Simon Brandhof
What are the side-effects to define wrapper messages as a workaround ? message Foo { Int32 bar = 1; } message Int32 { int32 value = 1; } In Java it allows to have Foo.hasBar() and Foo.getBar().getValue(). -- You received this message because you are subscribed to the Google Groups "Proto

[protobuf] Protobuf to generate methods for json also

2015-09-17 Thread Vachagan Balayan
Compilation from .proto to java classes that are most efficient in serialization/decerialization to binary is super awesome, however there are usecases that you need to push that piece of data to some UI or some client which does not necessarily need to know what protobuf is and how to decode yo

[protobuf] Protobuf to generate json serialization methods as well

2015-09-17 Thread Vachagan Balayan
Compilation from .proto to java class that does most efficient binary serialization is awesome, however sometimes we need to pass a json representation of the piece of that data to some UI or some other service which may not necessarily know about protobuf or want to have dependency to some dese

Re: [protobuf] Re: How to check empty message object

2015-09-17 Thread Ilia Mirkin
On Thu, Sep 17, 2015 at 11:18 AM, Simon Brandhof wrote: > What are the side-effects to define wrapper messages as a workaround ? > > message Foo { > Int32 bar = 1; > } > > message Int32 { > int32 value = 1; > } > > In Java it allows to have Foo.hasBar() and Foo.getBar().getValue(). Sub-messag

Re: [protobuf] Protobuf to generate methods for json also

2015-09-17 Thread 'Feng Xiao' via Protocol Buffers
On Thu, Sep 17, 2015 at 1:16 AM, Vachagan Balayan < vachagan.bala...@gmail.com> wrote: > Compilation from .proto to java classes that are most efficient in > serialization/decerialization to binary is super awesome, > however there are usecases that you need to push that piece of data to > some UI