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);
  }
private void beforeName ( ) { int context = peek ( ) ; if ( context == JsonScope . NONEMPTY_OBJECT ) { out . append ( ',' ) ; } else if ( context != JsonScope . EMPTY_OBJECT ) { throw new IllegalStateException ( "Nesting problem." ) ; } newline ( ) ; replaceTop ( JsonScope . DANGLING_NAME ) ; }
Inserts any necessary separators and whitespace before a name. Also
adjusts the stack to expect the name's value.