Package com.google.api.client.json

Examples of com.google.api.client.json.GenericJson


  protected void executeAndPrint(GenomicsRequest<? extends GenericJson> req) throws IOException {
    req.setDisableGZipContent(true); // Required to hit non-Google APIs
    if (!fields.isEmpty()) {
      req.setFields(fields);
    }
    GenericJson result = req.execute();
    if (result == null) {
      // Not all API calls have responses.
      System.out.println("success");
    } else {
      System.out.println("result: " + (prettyPrint ? result.toPrettyString() : result.toString()));
    }
  }
View Full Code Here


    return scopes;
  }

  @Override
  public void handleRequest(Genomics genomics) throws IOException {
    GenericJson json = customBody == null ? null :
        JacksonFactory.getDefaultInstance().createJsonParser(customBody)
            .parseAndClose(GenericJson.class);
    executeAndPrint(new GenomicsRequest<GenericJson>(genomics, customMethod, customEndpoint,
        json, GenericJson.class) {});
  }
View Full Code Here

TOP

Related Classes of com.google.api.client.json.GenericJson

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.