code: private JSONArray toJsonStringArray(Collection<? extends Object> collection) {
  
          if (null != collection) {
              JSONArray array = new JSONArray();
              for (Object o : collection) {
                  array.put("" + o);
              }
              return array;
          } else {
              return null;
          }
      }
docs: Convert a collection of objects to a JSON array with the string representations of that objects.
  @param collection the collection of objects.
  @return the JSON array with the string representations.