code: public static boolean allSimpleValues(JSONArray array) throws JSONException {
          for (int i = 0; i < array.length(); ++i) {
              if (!isSimpleValue(array.get(i))) {
                  return false;
              }
          }
          return true;
      }
docs: Returns whether all of the elements in the given array are simple values.
  
  @param array the JSON array to iterate through on
  @return true if all the elements in {@code array} are simple values
  @throws JSONException JSON parsing error
  @see #isSimpleValue(Object)