Thanks for the response Bo. I'm using Protocol Buffers for two purposes: (1) gRPC (communicating with a server) (2) Configuration (reading some config settings from a file and passing the info around a C++ codebase.)
It is for purpose (2) that I need to be able to parse human readable format. I'm thinking perhaps the right solution is to not use Protocol buffers for configuration (switch to json or yaml) or introduce a translation layer from json/yaml to Proto. On Mon, Jun 26, 2017 at 10:27 AM, Bo Yang <[email protected]> wrote: > What's your purpose for human readable format? For debug, maybe you can > use full runtime in test only. > > On Mon, Jun 26, 2017 at 10:26 AM Bo Yang <[email protected]> wrote: > >> All human readable format needs field information such as field name >> which is only available in descriptors. As a result, lite runtime cannot >> support human readable format. >> >> On Sun, Jun 25, 2017 at 3:56 PM 'Mitch Rudominer' via Protocol Buffers < >> [email protected]> wrote: >> >>> I am using Protobuf on a mobile device and so I want to stick to >>> Protobuf Lite. But I also have a need to deserialize a Message from a >>> human-readable string. >>> It seems the TextFormatClass() works with Message and not MessageLite. >>> Does anybody have a suggestion for how to deserialize a MessageLite from >>> a human-readable string? Lacking a better alternative I'm thinking of >>> deserializing a json or yaml string and manually converting to an instance >>> of my message type. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Protocol Buffers" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/group/protobuf. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
