code: void writeObjectKey(String key) throws IOException {
          if (commaState.get(commaDepth)) {
              output.append(',');
          } else {
              commaState.set(commaDepth, true);
          }
          output.append(newLine);
          output.append(currentIndent);
          writeString(key);
          output.append(':');
          if (newLine.length() > 0) {
              output.append(' ');
          }
      }
docs: Writes a JSON object key.
  <p>
  This handles the comma, string encoded key and separator colon.
  
  @param key  the item key
  @throws IOException if an error occurs