-
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.x升级到2.x时,将java对象转换成JSONObject对象时,对于List集合对象字段,转换后的集合字段的集合元素类型没有变 #2187
Comments
能帮忙提供重现问题的testcase么? |
wenshao
added a commit
that referenced
this issue
Jan 14, 2024
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.46-SNAPSHOT/ |
2.0.46-SNAPSHOT版本出现了死循环异常:
|
能帮构建重现死循环问题的testcase么? |
wenshao
added a commit
that referenced
this issue
Jan 17, 2024
testcase如下: 定义如下两个类:
上面的getFlatComponentDtos方法会引起死循环异常,测试方法如下:
|
getFlatComponentDtos方法有new,这个无法避免死循环的,配置一个:@JSONField(serialize=false) |
没明白为何无法避免,这个代码在fastjson1.x是能正常运行的 |
不行,依旧死循环 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
简要描述您碰到的问题。
fastjson1.x升级到2.x时,将java对象转换成JSONObject对象时,对于List集合对象字段,转换后的集合字段的集合元素类型没有变。1.x版本会自动将集合元素的类型转换成JSONObject
The text was updated successfully, but these errors were encountered: