code: public static @Nonnull JsonArray array(Iterable<?> c) {
          JsonArray jjArray = new JsonArray();
          if(c instanceof JsonElement) {
              jjArray.add((JsonArray)c);
          } else {
              for (Object o : c) {
                  if (o instanceof JsonElement) {
                      jjArray.add((JsonElement) o);
                  } else {
                      jjArray.add(primitive(o));
                  }
              }
          }
          return jjArray;
      }
docs: Add elements of a collection to a json array.
  This changes the behavior of array(JsonElement... elements) if you called it with a single JsonArray as an
  element. Previously you'd get an array with a single array element
  in it. Because a json array is just another collection, it now inherits the behavior and you get an array of
  elements in the collection. If the elements are JsonElements, they are added as such. Otherwise it attempts to
  interpret them as primitives.
  
  @param c an existing collection. If the elements are JsonElements, they will be added. Otherwise, primitive will be called on them.
  @return json array with the collection elements in it