mirror of
https://gitee.com/dromara/hutool.git
synced 2025-07-15 05:13:18 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ArrayUtil.isArray(source)){
|
if(ArrayUtil.isArray(source) || source instanceof JSONArray){
|
||||||
// 不支持集合类型转换为JSONObject
|
// 不支持集合类型转换为JSONObject
|
||||||
throw new JSONException("Unsupported type [{}] to JSONObject!", source.getClass());
|
throw new JSONException("Unsupported type [{}] to JSONObject!", source.getClass());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user