c++ protobuf与json互转
json
适用于现代 C++ 的 JSON。
项目地址:https://gitcode.com/gh_mirrors/js/json
免费下载资源
·
需要添加的头文件
#include <google/protobuf/message.h>
#include <google/protobuf/util/json_util.h>
#include <google/protobuf/text_format.h>
json串与protobuf的message互转
// json-string 转 protobuf message
util:Status google::protobuf::util::JsonStringToMessage(const std::string content, google::protobuf::Message* message);
// protobuf 转 json-string
util:Status google::protobuf::util::MessageToJsonString(const google::protobuf::Message& message, std::string* str );
GitHub 加速计划 / js / json
41.72 K
6.61 K
下载
适用于现代 C++ 的 JSON。
最近提交(Master分支:16 天前 )
960b763e
3 个月前
8c391e04
5 个月前
更多推荐
已为社区贡献6条内容
所有评论(0)