I am interested in subscribing to a set of topics, receiving messages and sending messages to topics. I have a generic subscription as `void cb_generic(const std::string& _msg)`. The content of the string is protobuf binary message which I want to convert to JSON. Any suggestions or examples on how to accomplish this task? The steps I see are:
1. Convert std::string to protobuf object
2. Convert protobuf object to json.
Thanks
↧