This commit is contained in:
Looly 2021-02-18 16:40:15 +08:00
parent f6d265a16d
commit 49452c76d8

View File

@ -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());
}