On Thu, Nov 1, 2018 at 11:08 AM Josh Humphries <
jh...@bluegosling.com> wrote:
>
> Michael,
> They map to field names in the options messages defined in descriptor.proto.
This is pretty interesting. So they've used the Proto spec to describe
itself, ey?
> Also, if you define custom options (by extending those options messages), you refer to them using qualified name enclosed in parentheses. That proto file above also serves as a sort of AST for proto source files, where FileDescriptorProto is the root of the AST. You can then look at UninterpretedOption for seeing the AST structure for parsing options.
So, for instance, my field options could include something like this:
... [default_value = 3, oneof_index = 1, json_name = "myField", ...]
And, so on, ad nauseam for the possible field options?
https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto#L136