public static <T> String writeJsonArray(List<T> javaArray) {
        final StringBuilder s = new StringBuilder(100);
        s.append("[");
        for (T element : javaArray) {
            try {
                s.append(writeJsonObjectToString(element));
                s.append(",");
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
        if (s.length() > 1) {
            s.deleteCharAt(s.length() - 1);
        }
        s.append("]");
        return s.toString();
    }