Skip to content

Commit 68623a1

Browse files
committed
- Tweaked output of the toArray() method in JSONArray
git-svn-id: svn://192.168.0.80/JavaXT/javaxt-core@1584 2c7b0aa6-e0b2-3c4e-bb4a-8b65b6c465ff
1 parent b62a221 commit 68623a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/javaxt/json/JSONArray.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ public boolean equals(Object obj){
234234
/** Returns an array of Objects backing the JSONArray
235235
*/
236236
public Object[] toArray(){
237-
return arr.toArray();
237+
Object[] out = new Object[arr.size()];
238+
for (int i=0; i<out.length; i++){
239+
out[i] = arr.get(i).toObject();
240+
}
241+
return out;
238242
}
239243

240244

0 commit comments

Comments
 (0)