pbc icon indicating copy to clipboard operation
pbc copied to clipboard

double or float type problems

Open pcxin opened this issue 11 years ago • 1 comments

proto 文件中定义有 double 或者 float类型的 在lua中进行赋值的时候 设置int类型 或者 double/float浮点类型 进行encode通过http发送到java后台进行解析的时候解析不出来 我进行在lua中把encode的数据 在decode回来进行打印发现浮点类型加长了好多位 我不知道是不是这样导致java端解析不出数据 求解

Proto file defined in double or float type In lua assignment set type int or double/float float to encode sent via HTTP to a Java background when parsing resolution not to come out I conducted in lua to encode the data found in floating-point decode back for printing type lengthened a lot I don't know whether that is in Java can't parse the data For help

pcxin avatar May 13 '14 09:05 pcxin

lua 只支持一种 number 类型. 而在 pbc 中是按 protobuffer 协议来编码成 float 或 double 的。你的问题应该和 pbc 无关。

cloudwu avatar May 13 '14 09:05 cloudwu