gpb icon indicating copy to clipboard operation
gpb copied to clipboard

[enhancement] support for gpb text format

Open sebastiw opened this issue 3 years ago • 1 comments

Hi,

I'm wondering about the support for *.textproto files, i.e. text-format for google protobufs. https://protobuf.dev/reference/protobuf/textformat-spec/ As far as I can see gpb doesn't support it, but maybe I'm mistaken?

Otherwise I've made a scanner and parser for the format, https://github.com/sebastiw/gpb_text and am wondering if you are interested in merging this code into gpb.

In future I also want to add validation using the proto-definition.

Best regards

sebastiw avatar Mar 29 '23 04:03 sebastiw

As far as I can see gpb doesn't support it, but maybe I'm mistaken?

True. I've noticed the text format has gotten documented, but haven't gotten around to implement anything around it.

... am wondering if you are interested in merging this code into gpb.

Nice! It could be interesting. It looks like the format from the gpb_text differs a bit from gpb's Erlang-format(s) of proto messages. I suppose an approach can be to post-process the output from gpb_text according to (the definitions of) a .proto.

tomas-abrahamsson avatar Mar 30 '23 19:03 tomas-abrahamsson