Class JSONArray<T>

    • Constructor Detail

      • JSONArray

        public JSONArray()
      • JSONArray

        public JSONArray​(Collection<? extends T> c)
    • Method Detail

      • toJSONString

        public static String toJSONString​(Collection collection)
        Convert a list to JSON text. The result is a JSON array. If this list is also a JSONAware, JSONAware specific behaviors will be omitted at this top level.
        Parameters:
        collection -
        Returns:
        JSON text, or "null" if list is null.
        See Also:
        JSONValue.toJSONString(Object)
      • toJSONString

        public static String toJSONString​(Object[] ary)
        Convert an object array to JSON text.

        patched by tomyeh

      • toJSONString

        public static String toJSONString​(int[] ary)
        Convert an integer array to JSON text.

        patched by tomyeh

      • toJSONString

        public static String toJSONString​(long[] ary)
        Convert a long array to JSON text.

        patched by tomyeh

      • toJSONString

        public static String toJSONString​(short[] ary)
        Convert a short array to JSON text.

        patched by tomyeh

      • toJSONString

        public static String toJSONString​(float[] ary)
        Convert a float array to JSON text.

        patched by tomyeh

      • toJSONString

        public static String toJSONString​(double[] ary)
        Convert a double array to JSON text.

        patched by tomyeh

      • toJSONString

        public static String toJSONString​(byte[] ary)
        Convert a byte array to JSON text.

        patched by tomyeh

      • toJSONString

        public static String toJSONString​(boolean[] ary)
        Convert a boolean array to JSON text.

        patched by tomyeh

      • toJSONString

        public static String toJSONString​(char[] ary)
        Convert a char array to JSON text.

        patched by tomyeh