Protobuf3: How to describe map of repeated string?

后端 未结 2 1140
北恋
北恋 2020-12-03 03:10

The Official documentation about map type says:

map map_field = N;

...where the key_type can be a

2条回答
  •  Happy的楠姐
    2020-12-03 03:49

    I think it should be as follows.

    message ListOfString {
       repeated string what_ever_name = 1;
    }
    
    // Then define:
    map what_ever_name = 1;
    

    Remember what_ever_name should be same in both places.

提交回复
热议问题