You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
String json = "[{\"a\":998982405},{\"a\":998992165},{\"$ref\":\"$[1]\"}]";
ConcurrentLinkedQueue list= JSON.parseObject(json, new TypeReference<ConcurrentLinkedQueue>(){});
报错:
Exception in thread "main" com.alibaba.fastjson2.JSONException: jsonpath not support operate : $[1], objectClassjava.util.concurrent.ConcurrentLinkedQueue
at com.alibaba.fastjson2.JSONPathSegmentIndex.eval(JSONPathSegmentIndex.java:157)
at com.alibaba.fastjson2.JSONPathSingleIndex.eval(JSONPathSingleIndex.java:33)
at com.alibaba.fastjson2.JSONReader.handleResolveTasks(JSONReader.java:319)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:993)
环境信息
String json = "[{\"a\":998982405},{\"a\":998992165},{\"$ref\":\"$[1]\"}]";
ConcurrentLinkedQueue list= JSON.parseObject(json, new TypeReference<ConcurrentLinkedQueue>(){});
报错:
Exception in thread "main" com.alibaba.fastjson2.JSONException: jsonpath not support operate : $[1], objectClassjava.util.concurrent.ConcurrentLinkedQueue
at com.alibaba.fastjson2.JSONPathSegmentIndex.eval(JSONPathSegmentIndex.java:157)
at com.alibaba.fastjson2.JSONPathSingleIndex.eval(JSONPathSingleIndex.java:33)
at com.alibaba.fastjson2.JSONReader.handleResolveTasks(JSONReader.java:319)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:993)
如果将ConcurrentLinkedQueue换成List,是不报错的。
fastjson1使用ConcurrentLinkedQueue是不报错的。
The text was updated successfully, but these errors were encountered: