protobuf的nested message嵌套消息。有时会出现序列话再反序列化后,嵌套消息的指却没有了
2016-04-02 04:47
417 查看
在使用protobuf的nested message嵌套消息时,有时会出现序列话再反序列化后,嵌套消息的指却没有了。我解决的方法是检查消息格式,把空行全去掉了,就可以了。但还是不确定是不是这个原因,至少没有找到别的原因。遇到类似的问题可以给我发邮件:zhangtiey@gmail.com
package peloton.networking; message BaseTest { required int32 test_base = 1; } message AbstractPlan { // A plan node can have multiple children repeated AbstractPlan children = 1; // associated with children optional bool include_children = 2; // the parent node optional AbstractPlan parent = 3; // only for test required int32 test_number = 4; // base test required BaseTest base = 5; } message SeqScanPlan { // the base abstract plan required AbstractPlan base = 1; // only for test required int32 test_number = 2; } message QueryPlanRequest { required string type = 1; optional SeqScanPlan seqscan_plan = 2; }
相关文章推荐
- js构建ui的统一异常处理方案(二)
- Linux _pthread 属性的控制
- js构建ui的统一异常处理方案(二)
- Linux_ pthread 线程的取消
- Linux _条件变量
- 一步一步利用django创建博客应用(一)
- 22. Generate Parentheses
- Scala.runtime In Compiler Mirror Not Found 怎么解决
- matlab下利用K-Means进行图像分类
- android cmd
- Android面试准备 第一天 第一例 Handler机制
- 使用MacBook Air的4项基本技巧
- tomcat服务最好部署在一个拥有最小权限的用户下
- Java反射入门
- 面向对象和面向过程连接数据库
- 二叉查找树的简单创建和3种遍历
- Quick-Cocos2dx 快速了解
- ListView 设置点击项目背景色
- 如何高效的开发Android程序
- 许单单肩负的担当:做错了的认,考虑不周也得认