-
Notifications
You must be signed in to change notification settings - Fork 496
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] Fastjson1 带 $ref 的数据在 fastjson2 无法正确反序列化 #2296
Labels
Milestone
Comments
这个方法的代码能看下吗? JSONObject jsonObject = JSON.parseObject(jsonConfig);
PmTopicConfig pmTopicConfig = jsonObject.to(PmTopicConfig.class); 如果是下面这个逻辑应该没问题的
|
rowstop
added a commit
to rowstop/fastjson2
that referenced
this issue
Mar 7, 2024
3 tasks
wenshao
pushed a commit
that referenced
this issue
Mar 8, 2024
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.48-SNAPSHOT/ |
反馈问题2:如果使用: final JSONObject jsonObject = JSON.parseObject(jsonConfig);
final PmTopicConfig pmTopicConfig = jsonObject.toJavaObject(PmTopicConfig.class); 则 private HashMap<String, PmStreamConfig> streamConfigs = new HashMap<>(); 在反序列化后,未被正确替换为 |
我拉一下主干代码,本地测试下,晚点回报。 @rowstop 我刚刚diff 了下本地的代码,应该是下面的这个部分导致的。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
简要描述您碰到的问题。
数据是用 fastjson 1 带引用写入的,结果在 消费侧用 fastjson2 反序列化时失败。
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
期待的正确结果
对您期望发生的结果进行清晰简洁的描述。
这个应该正确替换才对。
正确解析
相关日志输出
请复制并粘贴任何相关的日志输出。
附加信息
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
The text was updated successfully, but these errors were encountered: