Getting all field names from a protocol buffer in C++? -


is there way fields of protobuff message using descriptor, in c++?

there's way in python this: getting field names protocol buffer?

just wondering if there's same thing in c++. tried find on descriptor.h, without success.

yes. if have descriptor, number of fields using descriptor::field_count(). then, iterate on fields using descriptor::field(int index), returns fielddescriptor, can find name of each field using fielddescriptor::name().


Comments

Popular posts from this blog

php - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

authentication - ASP.NET Core 1.0. Bearer Token, cannot access custom claims -