Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG]接收科学计数法格式的double类型转换出错 #959

Closed
TonyWang972 opened this issue Nov 24, 2022 · 2 comments
Closed

[BUG]接收科学计数法格式的double类型转换出错 #959

TonyWang972 opened this issue Nov 24, 2022 · 2 comments
Labels
bug Something isn't working fixed
Milestone

Comments

@TonyWang972
Copy link

TonyWang972 commented Nov 24, 2022

问题描述

接收科学计数法格式的double类型转换出错,将版本变更为fastjson1就可以了

环境信息

  • OS信息: [e.g.:win11]
  • JDK信息: [e.g.:java 1.8]
  • 版本信息:[e.g.:Fastjson2 2.0.19]

重现步骤

运行

    public static void main(String[] args) {
        String json = "{\"V\": -2.0089457919266330204e-15}";

        JSONObject jsonObject = JSON.parseObject(json);
        System.out.println(jsonObject);
    }

期待的正确结果

{"V":-2.0089457919266330204E-15}

相关日志输出

image

@TonyWang972 TonyWang972 added the bug Something isn't working label Nov 24, 2022
@TonyWang972 TonyWang972 changed the title [BUG] [BUG]接收科学计数法格式的double类型转换出错 Nov 24, 2022
@wenshao wenshao added this to the 2.0.20 milestone Nov 24, 2022
@wenshao
Copy link
Member

wenshao commented Nov 24, 2022

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.20-SNAPSHOT/
问题已修复,请帮忙用2.0.20-SNAPSHOT版本帮忙验证

@wenshao
Copy link
Member

wenshao commented Nov 28, 2022

https://github.com/alibaba/fastjson2/releases/tag/2.0.20
问题已修复,请用新版本

@wenshao wenshao closed this as completed Nov 28, 2022
@wenshao wenshao added the fixed label Nov 28, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants