Re: [protobuf] How to use reflection of Protobuf to modify a Map

2022-04-26 Thread 'Adam Cozzette' via Protocol Buffers
For the purposes of reflection, maps are treated like a repeated field of messages, where each message has a key in field 1 and a value in field 2. The Descriptor type has map_key()

[protobuf] How to use reflection of Protobuf to modify a Map

2022-04-26 Thread Yuhui ZHI
https://stackoverflow.com/questions/71995707/how-to-use-reflection-of-protobuf-to-modify-a-map I just don't know how to use reflection to set a google::protobuf::Map. Can someone show me an example? -- You received this message because you are subscribed to the Google Groups "Protocol

[protobuf] proto descriptor best practice

2022-04-26 Thread 'Andreas Jellinghaus' via Protocol Buffers
Hi, I'm trying to understand protobuf better, more specific how to use descriptors, e.g. when bundled with proto messages, and how to avoid conflicts/mismatches/breakage from different state in the data+descriptor bundle vs. the code+descriptor of the binary. To share some background: my team