mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
fix json
This commit is contained in:
parent
f6d265a16d
commit
49452c76d8
@ -652,7 +652,7 @@ public class JSONObject implements JSON, JSONGetter<String>, Map<String, Object>
|
||||
return;
|
||||
}
|
||||
|
||||
if(ArrayUtil.isArray(source)){
|
||||
if(ArrayUtil.isArray(source) || source instanceof JSONArray){
|
||||
// 不支持集合类型转换为JSONObject
|
||||
throw new JSONException("Unsupported type [{}] to JSONObject!", source.getClass());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user