4 ms·
How does it infer the names of fields?
by gnachman 11y ago
How does it infer the names of fields?
- tumdum_ 11y agoIt looks that it requires either proto files or somethig like this - https://github.com/rsc-dev/pbd/blob/master/examples/test.ser https://github.com/rsc-dev/pbd/blob/master/examples/test.ser There is no way to infer attribute names from on the wire representation. In fact, there is no 100% sure way to distinguish between strings and embedded messages.
- euyyn 11y agoBecause it doesn't deserialize protocol buffers, but protocol buffer descriptors. Descriptors are serialized protos of this type: https://github.com/google/protobuf/blob/master/src/google/protobuf/descriptor.proto https://github.com/google/protobuf/blob/master/src/google/pr... . Each descriptor is a parsed representation of a ".proto" file, including the message names and field names.