Skip to content

[BUG] JSON.parseObject 丢失 [] #3438

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

Closed
JiakunXu opened this issue Mar 23, 2025 · 2 comments
Closed

[BUG] JSON.parseObject 丢失 [] #3438

JiakunXu opened this issue Mar 23, 2025 · 2 comments
Labels
bug Something isn't working fixed
Milestone

Comments

@JiakunXu
Copy link

问题描述

    public static void main(String[] args) {
        String aaa = "{\"file\":[{\"url\":\"http\"}]}";
        Bbb bbb = JSON.parseObject(aaa, Bbb.class);
        System.out.println(bbb);
    }

    @Data
    static class Bbb {
        String file;
    }

2.0.53 Test.Bbb(file=[{"url":"http"}])
2.0.54 Test.Bbb(file=[{"url":"http"}])
2.0.55 Test.Bbb(file={"url":"http"})
2.0.56 Test.Bbb(file={"url":"http"})

环境信息

  • 版本信息:[Fastjson2 2.0.55]

期待的正确结果

是修复了 2.0.54 之前版本存在的 bug,还是 2.0.55 之后版本产生的 bug。

@JiakunXu JiakunXu added the bug Something isn't working label Mar 23, 2025
@wenshao wenshao added this to the 2.0.57 milestone Mar 30, 2025
@wenshao
Copy link
Member

wenshao commented Mar 30, 2025

这个行为的改动不对,我已经恢复2.0.54之前的行为。

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.57-SNAPSHOT/
请帮忙用2.0.57-SNAPSHOT验证问题是否修复么? 2.0.57版本预计在4月6日前发布

@wenshao wenshao added the fixed label Mar 30, 2025
@wenshao
Copy link
Member

wenshao commented Mar 31, 2025

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

@wenshao wenshao closed this as completed Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants