-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc将int变成科学计数法 #16
Comments
原数据来自哪儿?php 的数据的话,你可以用 int(1870381757955251) 来让原数据确定是个整数类型,如果你的原数据是来自 json 的话,那是 json 本身的问题,json 本身不区分整数和浮点数,解析的时候,对于比较大的整数会按照浮点数处理。 |
源数据来自于饿了么的消息推送过来的json字符串 然后获取这个数据进行rpc处理 源数据大概是: |
这个是 json_decode 本身解码的问题,json_decode 解码之后的 refund_order_id 已经变成了一个 float 字段,而不是 int 字段,跟 hprose 没关系。 |
源数据:
{ "refund_order_id":1870381757955251, }
转义成:
{ "refund_order_id":1.8703817579553E+15, }
请问这个如何解决?
The text was updated successfully, but these errors were encountered: