Contents
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 Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.ArrayList
add, 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, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface com.webfirmframework.wffweb.json.JsonListNode
getValueAsBigDecimal, getValueAsBigInteger, getValueAsDouble, getValueAsInteger, getValueAsJsonListNode, getValueAsJsonMapNode, getValueAsLong, getValueAsString, toJsonString, toWffBMArray
Methods inherited from interface java.util.List
add, 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
-
Method Details
-
parse
-
toString
- Overrides:
toString
in classAbstractCollection<Object>
-