Is it possible to dump(view) data written in PB format without any knowledge about types used to write that data?
I've found https://stackoverflow.com/a/10253515/883738 that
Briefly, on the wire, protobufs are encoded as 3-tuples of , where the key is the field number assigned to the field in the .proto schema. The type is one of . It contains just enough information to decode the value of the 3-tuple, namely it tells you how long the value is.
What is my final goal is to write extension for Fiddler2 to see what's being sent/received in PB format.
There is a wireshark tool for this, iirc.
The problem here is that the protobuf format is ambiguous if you don't know the schema:
In fact, the only unambiguous tokens are start/end group, and they are semi-deprecated!
So: it is sort of doable, but you might need to present multiple interpretations of the same data
You can also only list field numbers: there are no member-names in the binary format
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With