code: public boolean writeArrayElementIfMatching(Class arrayComponentClass, Object o, boolean showType, Writer output)
      {
          if (!o.getClass().isAssignableFrom(arrayComponentClass) || notCustom.contains(o.getClass()))
          {
              return false;
          }
  
          try
          {
              return writeCustom(arrayComponentClass, o, showType, output);
          }
          catch (IOException e)
          {
              throw new JsonIoException("Unable to write custom formatted object as array element:", e);
          }
      }
docs: Write the passed in array element to the JSON output, if any only if, there is a customer writer
  for the class of the instance 'o'.
  @param arrayComponentClass Class type of the array
  @param o Object instance to write
  @param showType boolean indicating whether or not @type should be output.
  @param output Writer to write the JSON to (if there is a custom writer for o's Class).
  @return true if the array element was written, false otherwise.