处理数组类型
This commit is contained in:
parent
81891e97c9
commit
eba70ffe77
@ -110,7 +110,7 @@ public class JcPrinter extends CordovaPlugin {
|
||||
obj = methodJsonArgs.opt(i);
|
||||
}
|
||||
if(obj instanceof JSONArray){
|
||||
Object array = Array.newInstance(a,((JSONArray) obj).length());
|
||||
Object array = Array.newInstance(a.getComponentType(),((JSONArray) obj).length());
|
||||
for(int j=0;j<((JSONArray) obj).length();j++){
|
||||
Array.set(array,j,((JSONArray) obj).opt(j));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user