Class JSONArray


  • public class JSONArray
    extends JSONValue
    JSON array.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.ArrayList<JSONValue> elements  
    • Constructor Summary

      Constructors 
      Constructor Description
      JSONArray()  
    • Field Detail

      • elements

        private final java.util.ArrayList<JSONValue> elements
    • Constructor Detail

      • JSONArray

        JSONArray()
    • Method Detail

      • addElement

        void addElement​(JSONValue value)
        Add a value to the array.
        Parameters:
        value - the value to add
      • addTo

        public void addTo​(JSONTarget<?> target)
        Description copied from class: JSONValue
        Appends this value to the specified target.
        Specified by:
        addTo in class JSONValue
        Parameters:
        target - the target
      • getArray

        public JSONValue[] getArray()
        Returns the value.
        Returns:
        the value