Пример #1
0
  /**
   * object begin.
   *
   * @return this.
   * @throws IOException.
   */
  public JSONWriter objectBegin() throws IOException {
    beforeValue();

    mWriter.write(JSON.LBRACE);
    mStack.push(mState);
    mState = new State(OBJECT);
    return this;
  }
Пример #2
0
  /**
   * array begin.
   *
   * @return this.
   * @throws IOException.
   */
  public JSONWriter arrayBegin() throws IOException {
    beforeValue();

    mWriter.write(JSON.LSQUARE);
    mStack.push(mState);
    mState = new State(ARRAY);
    return this;
  }
Пример #3
0
 /**
  * object end.
  *
  * @return this.
  * @throws IOException.
  */
 public JSONWriter objectEnd() throws IOException {
   mWriter.write(JSON.RBRACE);
   mState = mStack.pop();
   return this;
 }
Пример #4
0
 /**
  * array end, return array value.
  *
  * @return this.
  * @throws IOException.
  */
 public JSONWriter arrayEnd() throws IOException {
   mWriter.write(JSON.RSQUARE);
   mState = mStack.pop();
   return this;
 }