如何在 cpp 中使用 msg-pack 序列化嵌套消息?

How to serialize nested message with msg-pack in cpp?

如何在 cpp 中使用 msg pack 序列化一个地图嵌套在地图中的结构 - 如下面的消息?:

{"string": "string", "string": {"string": int, "string": int, "string": int} }

我想你想要这个:-

struct s{
std::map< std::string, std::string> m;
std::map< std::string, std::map<std::string, std::int> > l;
};