Class Array

  • All Implemented Interfaces:
    JsonValue

    public final class Array
    extends java.lang.Object
    implements JsonValue
    A JsonValue array. A JSON array can contain any JSON value.
    • Constructor Detail

      • Array

        public Array()
      • Array

        public Array​(Jsonable... elements)
        Creates a JsonValue array of Jsonables.
        Parameters:
        elements - the elements of the Array
      • Array

        public Array​(java.lang.Boolean... elements)
        Creates a JsonValue array of Booleans.
        Parameters:
        elements - the elements of the Array
      • Array

        public Array​(java.lang.Number... elements)
        Creates a JsonValue array of Numbers.
        Parameters:
        elements - the elements of the Array
      • Array

        public Array​(java.lang.CharSequence... elements)
        Creates a JsonValue array of CharSequences.
        Parameters:
        elements - the elements of the Array
      • Array

        public Array​(JsonValue... elements)
        Creates a JsonValue array of arbitrary JsonValue values.
        Parameters:
        elements - the elements of the Array
    • Method Detail

      • serialize

        public void serialize​(JsonSink jsonSink)
                       throws java.io.IOException
        Specified by:
        serialize in interface JsonValue
        Throws:
        java.io.IOException