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] 解析不正确:JSONObject.parse("{1,2}") => {1:2} #2155

Closed
yanchangyou opened this issue Jan 5, 2024 · 3 comments
Closed

[BUG] 解析不正确:JSONObject.parse("{1,2}") => {1:2} #2155

yanchangyou opened this issue Jan 5, 2024 · 3 comments
Labels
bug Something isn't working fixed
Milestone

Comments

@yanchangyou
Copy link

yanchangyou commented Jan 5, 2024

问题描述

JSON解析不正确

环境信息

请填写以下信息:

  • OS信息: MacOS
  • JDK信息: corretto-11.0.21
  • 版本信息:2.0.42

重现步骤

如何操作可以重现该问题:

JSONObject.parse("{1,2}") => {1:2}

        System.out.println(JSONObject.parse("{1,2}"));

期待的正确结果

提示:语法错误

相关日志输出

{1:2}

@yanchangyou yanchangyou added the bug Something isn't working label Jan 5, 2024
@wenshao wenshao added this to the 2.0.45 milestone Jan 5, 2024
wenshao added a commit that referenced this issue Jan 5, 2024
@wenshao wenshao added the fixed label Jan 5, 2024
@wenshao
Copy link
Member

wenshao commented Jan 5, 2024

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.45-SNAPSHOT/
问题已修复,请帮2.0.45-SNAPSHOT验证问题是否已经修复,将会在1月7日前发布新版本

@yanchangyou
Copy link
Author

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.45-SNAPSHOT/ 问题已修复,请帮2.0.45-SNAPSHOT验证问题是否已经修复,将会在1月7日前发布新版本

JSONObject.parse("{1,2}") => {1:2} 好了,但又发现一些增加位数的case

JSONObject.parse("{10,2}") => {10:2}
JSONObject.parse("{1,20}") => {1:20}

@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