code: private void beforeName() {
      int context = peek();
      if (context == JsonScope.NONEMPTY_OBJECT) { // first in object
        out.append(',');
      } else if (context != JsonScope.EMPTY_OBJECT) { // not in an object!
        throw new IllegalStateException("Nesting problem.");
      }
      newline();
      replaceTop( JsonScope.DANGLING_NAME);
    }
docs: Inserts any necessary separators and whitespace before a name. Also
  adjusts the stack to expect the name's value.