fastjson2 icon indicating copy to clipboard operation
fastjson2 copied to clipboard

使用兼容包的JSONPath.read读取json对象,内部同时存在com.alibaba.fastjson2.JSONObject和com.alibaba.fastjson.JSONObject对象

Open Vinke2 opened this issue 10 months ago • 1 comments

你好,我曾经在 https://github.com/alibaba/fastjson2/issues/1922 反馈过类似问题,现在我在最新2.0.49版本的兼容包上面又遇到了这个问题:

List array = (List) JSONPath.read("{\n" +
" "data": [\n" +
" {\n" +
" "id": 7315635187420579130\n" +
" },\n" +
" {\n" +
" "id": 7315635187420579130\n" +
" }\n" +
" ]\n" +
"}", "data");
for (JSONObject jsonObject : array) {
System.out.println(jsonObject.get("id"));
}

Vinke2 avatar Apr 23 '24 09:04 Vinke2

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

wenshao avatar Apr 27 '24 16:04 wenshao

https://github.com/alibaba/fastjson2/releases/tag/2.0.50 2.0.50已发布,请用新版本

wenshao avatar May 12 '24 05:05 wenshao