protobuf新增key-value
时间: 2023-08-21 08:07:23 浏览: 137
protobuf-java-3.11.4-API文档-中文版.zip
5星 · 资源好评率100%
在protobuf中,可以使用map字段来实现key-value的存储。例如,如果你想创建一个映射,每个Project使用一个string作为key,可以按照以下方式定义:
map<string, Project> projects = 3;
这里,projects是一个map字段,其中key的类型是string,value的类型是Project。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [protobuf3-------入门语法解析](https://blog.csdn.net/data_curd/article/details/106611216)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [SpringBoot整合Redis + SpringCache + Protobuf,优雅地实现key-value键值对存储DEMO。](https://blog.csdn.net/shenTiBeiTaoKongLa/article/details/107123596)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文