Re: [protobuf] Skip certain indices while encoding

2022-11-28 Thread LakshmiKanth Gupta
EmployeeDataMinimal solution doesn't work for me. Use case which I have is much more complex. But many thanks for your helping hand. On Monday, November 28, 2022 at 10:26:11 AM UTC+1 marc.g...@gmail.com wrote: > For 1 options: a) don't assign a value to salary (unless it is "required" > in

Re: [protobuf] Skip certain indices while encoding

2022-11-28 Thread Marc Gravell
For 1 options: a) don't assign a value to salary (unless it is "required" in proto2, which doesn't appear to be the case), or b) create a new EmployeeDataMinimal message that *doesn't have a salary*, and serialize that (I can't comment on 2; not a C++ person) On Mon, 28 Nov 2022 at 08:14,

[protobuf] Skip certain indices while encoding

2022-11-28 Thread LakshmiKanth Gupta
Hello All, message EmployeeData { string name =1; string address = 2; integer salary =3; } 1. When I transmit the EmployeeData., I would like to skip "salary" from encoding. Is that possible? 2. Is it possible to tag a void pointer with employeedata object in c++ code? Some