Examples of skipToKey()


Examples of com.google.api.client.json.JsonParser.skipToKey()

            currentToken = parser.nextToken();
          }
          // check for empty content
          if (currentToken != null) {
            // make sure there is an "error" key
            parser.skipToKey("error");
            if (parser.getCurrentToken() != JsonToken.END_OBJECT) {
              details = parser.parseAndClose(GoogleJsonError.class, null);
              detailString = details.toPrettyString();
            }
          }
View Full Code Here

Examples of com.google.api.client.json.JsonParser.skipToKey()

    }
    // parse
    boolean failed = true;
    JsonParser parser = JsonHttpParser.parserForResponse(jsonFactory, response);
    try {
      parser.skipToKey(response.isSuccessStatusCode() ? "data" : "error");
      if (parser.getCurrentToken() == JsonToken.END_OBJECT) {
        throw new IllegalArgumentException("data key not found");
      }
      failed = false;
      return parser;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.