Class JsonList
- All Implemented Interfaces:
- JsonBaseNode,- JsonListNode,- JsonPart,- Serializable,- Cloneable,- Iterable<Object>,- Collection<Object>,- List<Object>,- RandomAccess,- SequencedCollection<Object>
To parse json array string:
 
     JsonListNode jsonList = JsonList.parse("[1, 4, 0, 1]");
     //To get the value from an index
     int intValueAt1 = jsonList.getValueAsInteger(1);
     System.out.println("intValueAt1 = " + intValueAt1); // intValueAt1 = 4
     //Prints the json string
     System.out.println("toJsonString = " + jsonList.toJsonString()); // toJsonString = [1,4,0,1]
 - Since:
- 12.0.4
- See Also:
- 
Field SummaryFields inherited from class java.util.AbstractListmodCount
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class java.util.ArrayListadd, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollectioncontainsAllMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArrayMethods inherited from interface com.webfirmframework.wffweb.json.JsonListNodegetValueAsBigDecimal, getValueAsBigInteger, getValueAsDouble, getValueAsInteger, getValueAsJsonListNode, getValueAsJsonMapNode, getValueAsLong, getValueAsString, toJsonString, toWffBMArrayMethods inherited from interface java.util.Listadd, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
- 
Constructor Details- 
JsonListpublic JsonList(int initialCapacity) 
- 
JsonListpublic JsonList()
- 
JsonList
 
- 
- 
Method Details- 
parse
- 
toString- Overrides:
- toStringin class- AbstractCollection<Object>
 
 
-