Ejemplo n.º 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;
  }
Ejemplo n.º 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;
  }
Ejemplo n.º 3
0
 /**
  * object end.
  *
  * @return this.
  * @throws IOException.
  */
 public JSONWriter objectEnd() throws IOException {
   mWriter.write(JSON.RBRACE);
   mState = mStack.pop();
   return this;
 }
Ejemplo n.º 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;
 }