code: private void write(ProcessResult processResult) throws IOException {
          if (processResult.getName() != null) {
              openCurlyBracket();
              writeName(processResult.getName());
          }
          if (processResult.isEmpty()) {
              writeNull();
          } else if (processResult.size() == 1) {
              ContentResult contentResult = processResult.get(0);
              write(contentResult);
          } else {
              openSquareBracket();
              Iterator<ContentResult> it = processResult.iterator();
              while (it.hasNext()) {
                  ContentResult contentResult = it.next();
                  write(contentResult);
                  if (it.hasNext()) {
                      writeComma();
                  }
              }
              closeSquareBracket();
          }
          if (processResult.getName() != null) {
              closeCurlyBracket();
          }
      }
docs: Write a {@code ProcessResult} object to the character-output stream.
  
  @param processResult the {@code ProcessResult} object to write to a character-output stream
  @throws IOException if an I/O error has occurred