code: public JSONWriter object() {
          if (this.mode == INIT) {
              this.mode = OBJECT;
          }
          if (this.mode == OBJECT || this.mode == ARRAY) {
              this.append("{");
              this.push(KEY);
              this.comma = false;
              return this;
          }
          throw new JSONException("Misplaced object: expected mode of INIT, OBJECT or ARRAY but was " + this.mode);
  
      }
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