[protobuf] Re: How to retrieve parameters using tag numbers using CodedInputStream

2010-08-19 Thread Prakash Rao
I tried YourProtocolMessage.getDefaultInstance() and as you said it is of zero byte size. I've a required field called ID with default cluase in pnroto file (with default value set to -1). When i send the default instance, I see ID set to -1 (which is default value specified in proto file) but on

[protobuf] Re: How to retrieve parameters using tag numbers using CodedInputStream

2010-08-16 Thread Prakash Rao
Thanks for your response. I had one more question. Is it possible to write a null value to output stream? I'm writing a client/server application and using PB as layer to transfer data. In certain cases response would be null if required data is not there in my DB. For null responses, i don't want

Re: [protobuf] Re: How to retrieve parameters using tag numbers using CodedInputStream

2010-08-16 Thread Evan Jones
On Aug 16, 2010, at 10:56 , Prakash Rao wrote: I'm just looking for a easy way to write null response if data is not present in DB and write proto message object if data is present parse these in client side appropriately. I didn't get a easy way to do this using CodedInputStream. Currently i'm

Re: [protobuf] Re: How to retrieve parameters using tag numbers using CodedInputStream

2010-08-12 Thread Jason Hsueh
A tag indicates to the decoder what is coming next in the input stream, and allows the decoder to handle it appropriately. This is a key feature of the protobuf wire format - this enables forward and backward compatibility, as well omitting fields that aren't present from the serialization. The