code: public JSONWriter object() throws JSONException {
          if (m_mode == 'k' || m_mode == 'd') {
              throw new JSONException("Misplaced object.");
          }
          push(m_expectingComma ?
                  ScopeOptions.ObjectWithComma :
                  ScopeOptions.ObjectWithoutComma);
          return this;
      }
docs: Begin appending a new object. All keys and values until the balancing
  <code>endObject</code> will be appended to this object. The
  <code>endObject</code> method must be called to mark the object's end.
  @return this
  @throws JSONException If the nesting is too deep, or if the object is
  started in the wrong place (for example as a key or after the end of the
  outermost array or object).