have to create java pojo for the existing proto includes Map

风流意气都作罢 提交于 2019-12-06 07:34:22

Maps are a new feature in protobuf 3.0 (aka "proto3"), which is still in alpha. You are probably using 2.x, in which case there are no maps. Your best bet is to use a repeated field:

repeated MyMap map_field = 4;
message MyMap {
  optional string key = 1;
  optional string value = 2;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!