Package com.massivecraft.mcore.xlib.gson.stream

Examples of com.massivecraft.mcore.xlib.gson.stream.JsonScope


   * Closes the current scope by appending any necessary whitespace and the
   * given bracket.
   */
  private JsonWriter close(JsonScope empty, JsonScope nonempty, String closeBracket)
      throws IOException {
    JsonScope context = peek();
    if (context != nonempty && context != empty) {
      throw new IllegalStateException("Nesting problem: " + stack);
    }
    if (deferredName != null) {
      throw new IllegalStateException("Dangling name: " + deferredName);
View Full Code Here


  /**
   * Inserts any necessary separators and whitespace before a name. Also
   * adjusts the stack to expect the name's value.
   */
  private void beforeName() throws IOException {
    JsonScope context = peek();
    if (context == JsonScope.NONEMPTY_OBJECT) { // first in object
      out.write(',');
    } else if (context != JsonScope.EMPTY_OBJECT) { // not in an object!
      throw new IllegalStateException("Nesting problem: " + stack);
    }
View Full Code Here

TOP

Related Classes of com.massivecraft.mcore.xlib.gson.stream.JsonScope

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.