Examples of toJSON()


Examples of com.comcast.cns.model.CNSTopicDeliveryPolicy.toJSON()

     assertTrue("default sickly retry policy not set correctly",nsrp.getNumNoDelayRetries() == 0);
     assertTrue("default sickly retry policy not set correctly",nsrp.getBackOffFunction() == CnsBackoffFunction.geometric);
    
     assertTrue("defaultThrottlePolicy not set correctly", ndtp.getMaxReceivesPerSecond() == 19);
     try {
       JSONObject json = topicPolicy.toJSON();
       logger.debug("Json is:" + json.toString());
       assertTrue("toJSON fails to return proper JSON", json.has("http"));
       JSONObject httpJson = json.getJSONObject("http");
       assertTrue("toJSON fails to return proper JSON", httpJson.has("defaultHealthyRetryPolicy"));
       assertTrue("toJSON fails to return proper JSON", httpJson.has("defaultSicklyRetryPolicy"));
View Full Code Here

Examples of com.denisk.appengine.nl.server.data.Good.toJson()

    g.setName(name);
    g.setDescription(new Text(descr));
    g.setImageBlobKey(imageKey);
    g.setParentKeyStr(KeyFactory.keyToString(categoryKey));

    dh.persistGood(g.toJson());

    assertEquals(1,
        ds.prepare(new Query(Good.KIND)).countEntities(withLimit(10)));

    List<Entity> list = ds.prepare(new Query(Good.KIND)).asList(
View Full Code Here

Examples of com.diagrammr.data.DiagramData.toJSON()

      DiagramData data = DiagramStoreManager.get().getDiagram(
          req.getParameter("key"), email);

      // Post to render server
      String json = URLEncoder.encode(data.toJSON(), "UTF-8");

      HTTPRequest request = new HTTPRequest(new URL(SERVER), HTTPMethod.POST);
      request.setPayload(("json=" + json).getBytes("UTF-8"));
      HTTPResponse response = URLFetchServiceFactory.getURLFetchService()
          .fetch(request);
View Full Code Here

Examples of com.dianping.cat.report.page.JsonBuilder.toJson()

      NetGraph netGraph = netGraphSet.findNetGraph(minute);

      if (netGraph != null) {
        for (NetTopology netTopology : netGraph.getNetTopologies()) {
          String topoName = netTopology.getName();
          String data = jb.toJson(netTopology);

          netGraphData.add(new Pair<String, String>(topoName, data));
        }
      }
    }
View Full Code Here

Examples of com.dianping.cat.report.page.dependency.dashboard.ProductLinesDashboard.toJson()

        m_externalInfoBuilder.buildNodeZabbixInfo(node, model, payload);
      }
    }
    model.setReportStart(new Date(payload.getDate()));
    model.setReportEnd(new Date(payload.getDate() + TimeHelper.ONE_HOUR - 1));
    model.setDashboardGraph(dashboardGraph.toJson());
    model.setDashboardGraphData(dashboardGraph);
  }

  private void buildDependencyLineChart(Model model, Payload payload, Date reportTime) {
    DependencyReport dependencyReport = queryDependencyReport(payload);
View Full Code Here

Examples of com.dotcms.repackage.com.google.gson.Gson.toJson()

            IndiciesInfo info=APILocator.getIndiciesAPI().loadIndicies();
            Gson gson=new Gson();
            String mapping=null;
            try {
                if(con.isWorking()) {
                    mapping=gson.toJson(mappingAPI.toMap(con));
                   
                    if(!reindexOnly)
                        req.add(new IndexRequest(info.working, "content", id)
                                    .source(mapping));
                    if(info.reindex_working!=null)
View Full Code Here

Examples of com.dubture.getcomposer.core.ComposerPackage.toJson()

    VersionedPackage phpVersion = new VersionedPackage();
    phpVersion.setName("php");
    phpVersion.setVersion(">=" + firstPage.getPHPVersionValue().getAlias().replace("php", ""));
    composerPackage.getRequire().add(phpVersion);

    ByteArrayInputStream bis = new ByteArrayInputStream(composerPackage.toJson().getBytes());
    file.create(bis, true, monitor);
    getProject().refreshLocal(0, monitor);
  }

  protected void setPhpLangOptions() {
View Full Code Here

Examples of com.elastisys.scale.cloudadapers.api.types.MachinePool.toJson()

  @Produces(MediaType.APPLICATION_JSON)
  public Response getPool() {
    log.info("GET /pool");
    try {
      MachinePool machinePool = this.cloudAdapter.getMachinePool();
      return Response.ok(machinePool.toJson()).build();
    } catch (Exception e) {
      String message = "failure to process pool get request: "
          + e.getMessage();
      log.error(message, e);
      return Response.status(Status.INTERNAL_SERVER_ERROR)
View Full Code Here

Examples of com.findwise.hydra.local.LocalDocument.toJson()

 
  @Override
  public String toJson() {
    LocalDocument ld = new LocalDocument();
    ld.putAll(this);
    return ld.toJson();
  }
 
  @Override
  public String contentFieldsToJson(Iterable<String> contentFields) {
    LocalDocument ld = new LocalDocument();
View Full Code Here

Examples of com.findwise.hydra.local.LocalQuery.toJson()

    MongoConnector mdc = mongoConnectorResource.getConnector();
    LocalQuery lq = new LocalQuery();
    lq.requireTouchedByStage("test");
    lq.requireNotTouchedByStage("test2");
    lq.requireContentFieldExists("exists");
    MongoQuery q = new MongoQuery(lq.toJson());
    Document<MongoType> d = mdc.getDocumentReader().getDocument(q);
    if(d!=null) {
      fail("Expected no document to be returned");
    }
    lq = new LocalQuery();
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.