mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-24 00:03:17 -05:00
Added clear() methods to JSONObject and JSONArray
This commit is contained in:
@@ -567,6 +567,14 @@ public class JSONArray implements Iterable<Object> {
|
||||
return this.myArrayList.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all of the elements from this JSONArray.
|
||||
* The JSONArray will be empty after this call returns.
|
||||
*/
|
||||
public void clear() {
|
||||
return this.map.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the optional object value associated with an index.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user