How to visualize data from google protocol buffer?

2019-03-14 14:20发布

I would like to store data using google protocol buffers (another serialized format would work, too), and then have an UI to browse that data. Is there a C++ framework/API that would allow me to do this?

For example, it could use the reflection interface of protobuf, and then fill in the data into Qt's QTableView (or from another toolkit). I could write such code myself -- however, much rather I would re-use existing code, which is why I am asking for advice here!

Or are there more general UI toolkits that can visualize data which is accessible via some reflection API?

8条回答
戒情不戒烟
2楼-- · 2019-03-14 15:11

Wireshark has a protobuf plugin that lets you visualize the contents of protobuf messages. I'd also dig in to the DebugString() in google/protobuf/message.h or message_lite.h (I forget which off the top of my head) and see if you can easily dress that up for presentation to a user.

http://code.google.com/p/protobuf-wireshark/

查看更多
Explosion°爆炸
3楼-- · 2019-03-14 15:12

To resolve binary representation without schema is hard. But if you'd like just to have a better view of pb's text format or DebugString(), you can try the Protobuf Visualizer:

http://codingstory.com/pv

查看更多
登录 后发表回答