-
Notifications
You must be signed in to change notification settings - Fork 495
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
[BUG] 千分符表示的字符串转long失败 #2461
Comments
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.50-SNAPSHOT/ |
{"content":"jonathan.yue Apply to join the organization","extra":{"relationId":200,000,000,002,005,"orgId":"rxDDjvGQmUyYrPom","subType":"JOIN_APPLY"},"push":{"content":"jonathan.yue Apply to join the organization","params":{"relationId":200,000,000,002,005,"orgId":"rxDDjvGQmUyYrPom","subType":"JOIN_APPLY"},"subject":"Organizational Reminder","type":"ORG_MEM"},"subject":"Organizational Reminder","type":"ORG_MEM"} 2.0.9 由于科学计数法的原因,升级到了2.0.50,报了新的错误 |
问题描述
科学计数法字符串转long失败,fastjson可以
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
1、字符串: String channelRespBody="{"openTime":"1,659,597,865","startTime":1712903332573 }";
2、待转类型: private Long openTime;
期待的正确结果
openTime = 1,659597865
相关日志输出
请复制并粘贴任何相关的日志输出。
Exception in thread "main" com.alibaba.fastjson2.JSONException: parseLong error, value : 1,659,597,865
at com.alibaba.fastjson2.JSONReader.toInt64(JSONReader.java:3133)
at com.alibaba.fastjson2.JSONReader.getInt64(JSONReader.java:984)
at com.alibaba.fastjson2.JSONReaderUTF16.readInt64(JSONReaderUTF16.java:3144)
at com.alibaba.fastjson2.reader.ORG_1_22_EeCheckIbanBo.readObject(Unknown Source)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:726)
at com.kucoin.wallet.chaincommon.pay.test.TestFastjson.main(TestFastjson.java:52)
附加信息
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
The text was updated successfully, but these errors were encountered: