docs: private void writeComplexObject(Writer writer, int indentDepth, boolean contentOnly, boolean compact)
      throws IOException
      {
          if (logger.isLoggable(Level.FINER)) logger.entering(className, "writeComplexObject(Writer, int, boolean, boolean)");
  
          boolean wroteTagText = false;
  
          if (!contentOnly)
          {
              if (logger.isLoggable(Level.FINEST)) logger.logp(Level.FINEST, className, "writeComplexObject(Writer, int, boolean, boolean)", "Writing object: [" + this.objectName + "]");
  
              if (!compact)
              {
                  writeIndention(writer, indentDepth);
              }
  
              writer.write( "\"" + this.objectName + "\"");
  
              if (!compact)
              {
                  writer.write(" : {\n");
              }
              else
              {
                  writer.write(":{");
              }
          }
          else
          {
              if (logger.isLoggable(Level.FINEST)) logger.logp(Level.FINEST, className, "writeObject(Writer, int, boolean, boolean)", "Writing object contents as an anonymous object (usually an array entry)");
  
              if (!compact)
              {
                  writeIndention(writer, indentDepth);
                  writer.write("{\n");
              }
              else
              {
                  writer.write("{");
              }
          }
  
          if (this.tagText != null && !this.tagText.equals("") && !this.tagText.trim().equals(""))
          {
              writeAttribute(writer,"content", this.tagText.trim(), indentDepth + 1, compact);
              wroteTagText = true;
          }
  
          if (this.attrs != null && !this.attrs.isEmpty() && wroteTagText)
          {
              if (!compact)
              {
                  writer.write(",\n");
              }
              else
              {
                  writer.write(",");
              }
          }
  
          writeAttributes(writer,this.attrs,indentDepth, compact);
          if (!this.jsonObjects.isEmpty())
          {
              if (this.attrs != null && (!this.attrs.isEmpty() || wroteTagText))
              {
                  if (!compact)
                  {
                      writer.write(",\n");
                  }
                  else
                  {
                      writer.write(",");
                  }
  
              }
              else
              {
                  if (!compact)
                  {
                      writer.write("\n");
                  }
              }
              writeChildren(writer, indentDepth, compact);
          }
          else
          {
              if (!compact)
              {
                  writer.write("\n");
              }
          }
  
          if (!compact)
          {
              writeIndention(writer, indentDepth);
              writer.write("}\n");
              //writer.write("\n");
          }
          else
          {
              writer.write("}");
          }
  
          if (logger.isLoggable(Level.FINER)) logger.exiting(className, "writeComplexObject(Writer, int, boolean, boolean)");
      }