code: public static boolean writeComplex(Output out, Object complex) {
          log.trace("writeComplex");
          if (writeListType(out, complex)) {
              return true;
          } else if (writeArrayType(out, complex)) {
              return true;
          } else if (writeXMLType(out, complex)) {
              return true;
          } else if (writeCustomType(out, complex)) {
              return true;
          } else if (writeObjectType(out, complex)) {
              return true;
          } else {
              return false;
          }
      }
docs: Writes a complex type object out
  
  @param out
  Output writer
  @param complex
  Complex datatype object
  @return boolean true if object was successfully serialized, false otherwise