Skip to content
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] JSONPath.set()空指针异常 #2145

Closed
mimajiushi opened this issue Jan 1, 2024 · 1 comment
Closed

[BUG] JSONPath.set()空指针异常 #2145

mimajiushi opened this issue Jan 1, 2024 · 1 comment
Labels
bug Something isn't working fixed
Milestone

Comments

@mimajiushi
Copy link
Contributor

mimajiushi commented Jan 1, 2024

提到内部issues了: https://code.alibaba-inc.com/shaojin.wensj/fastjson2/issues#openWorkitem=558912

版本2.0.44,简易示例代码如下:

    public static void main(String[] args) throws Exception {
        String testJson = "{\"key2\": [null, null, null, null, null, null]}";
        Object jsonObject = JSON.parse(testJson);
        Object eval = JSONPath.eval(jsonObject, "$");
        System.out.println(eval);
        JSONPath.set(eval, "$..key3", "value2");
        System.out.println(eval);
    }

image

@mimajiushi mimajiushi added the bug Something isn't working label Jan 1, 2024
@mimajiushi mimajiushi changed the title [BUG] 大json下使用JSONPath.set()空指针异常 [BUG] JSONPath.set()空指针异常 Jan 1, 2024
@wenshao wenshao added the fixed label Jan 2, 2024
@wenshao wenshao added this to the 2.0.45 milestone Jan 2, 2024
@wenshao
Copy link
Member

wenshao commented Jan 7, 2024

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

@wenshao wenshao closed this as completed Jan 7, 2024
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