Package com.github.tadukoo.parsing.json
Interface JSONArray<T>
- All Superinterfaces:
Collection<T>
,Iterable<T>
,JSONObject
,List<T>
- All Known Implementing Classes:
JSONArrayList
JSON Array represents an array of objects in JSON. It's stored as a List of Objects.
- Since:
- Alpha v.0.1
- Version:
- Alpha v.0.3.1
- Author:
- Logan Ferree (Tadukoo)
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
convertToJSON
(JSONConverter converter) Converts this JSON object into an actual JSON stringgetItems()
int
size()
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArray
-
Method Details
-
getItems
- Returns:
- The list of items in the array
-
size
int size() -
convertToJSON
Converts this JSON object into an actual JSON string- Specified by:
convertToJSON
in interfaceJSONObject
- Parameters:
converter
- A JSON converter used for converting sub-objects if needed- Returns:
- A JSON string representing this object
-