Re: [protobuf] Is there a way to find out the type of a field (repeated/optional/required) programatically

44 views
Skip to first unread message

Jason Hsueh

unread,
Sep 17, 2012, 11:35:57 PM9/17/12
to JP, Protocol Buffers
The various *Descriptor classes provide type-definition information. Check out the API reference for your specific language (for C++ it's in descriptor.h, Java is Descriptors.java, etc)


On Sun, Sep 16, 2012 at 12:51 AM, JP <large...@gmail.com> wrote:
Hi All,
     I searched the documentation and could not find any thing. I want to find out from a program how a field is defined (required/optional/repeated). Is it possible.
I understand I can look at the .proto file. But I would like to know if I can do that from the program

Thanks
JP

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/protobuf/-/3DGw6rftso0J.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.

Reply all
Reply to author
Forward
0 new messages