老版本兼容性问题
#176
Replies: 3 comments
-
版本平滑升级问题 |
Beta Was this translation helpful? Give feedback.
0 replies
-
使用 这里说的是,无论选项怎么设置,所有的函数都接受带#的字符串。但是只有提供了string相关选项,decode才会返回带#的字符串。因此选项仍然是有用的。 如果需要数字,可以自行去掉#,加这个只是为了保证精度。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
另外应该默认就是“int64_as_number",#的数字范围也没有缩小(最近做了一次扩大),应该是你们主动设置了选项才会带这个#。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我们这边早起就开始使用这个pb库,最近因为和外部对接发现老版本uint64解析出现偏差,故升级了lib(升级到当前最新版),但是发现原来的时间戳解析前面都加了个#,所有的长度超过12的数字类型的数据都被动加了#,请问是否有开关设置默认数字类型解析。文档中也有说明
Note: The string returned by int64_as_string or int64_as_hexstring will prefix a '#' character. Because Lua may convert between string with number, prefix a '#' makes Lua return the string as-is.
all routines in all module accepts '#' prefix string/hex string as arguments regardless of the option setting.
这个说是不是就是int64_as_string和int64_as_number的设置实际上是没有必要的。
Beta Was this translation helpful? Give feedback.
All reactions