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]无法解析 $ref: @ #2671

Open
raychow opened this issue Jun 6, 2024 · 1 comment
Open

[BUG]无法解析 $ref: @ #2671

raychow opened this issue Jun 6, 2024 · 1 comment
Labels
bug Something isn't working fixed
Milestone

Comments

@raychow
Copy link

raychow commented Jun 6, 2024

问题描述

fastjson2 2.0.51

final var str = "{\"context\":{\"$ref\":\"@\"}}";
JSON.parseObject(str, Map.class);

报错:

Exception in thread "main" com.alibaba.fastjson2.JSONException: reference path invalid : @
at com.alibaba.fastjson2.JSONReader.handleResolveTasks(JSONReader.java:311)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:866)

在 fastjson1 中, 可以被解析为 {"context":{"context":...}}

@raychow raychow added the bug Something isn't working label Jun 6, 2024
@wenshao wenshao added this to the 2.0.52 milestone Jun 6, 2024
@wenshao wenshao added the fixed label Jun 6, 2024
@wenshao
Copy link
Member

wenshao commented Jun 6, 2024

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

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