Examples of toJSON()


Examples of edu.uci.ics.hyracks.api.job.JobSpecification.toJSON()

                @Override
                public void notifyCodegenResult(Module module) {
                    if (opts.showRP) {
                        JobSpecification jobSpec = module.getHyracksJobSpecification();
                        try {
                            System.err.println(jobSpec.toJSON().toString(2));
                        } catch (JSONException e) {
                            e.printStackTrace();
                            System.err.println(jobSpec.toString());
                        }
                    }
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.Model.toJSON()

    Session s = getSessionFromCookies(cook);

    Model m;
    m = (Model) map.get(args[0]+args[1]).makeEntity(s,content);
       
        return m.toJSON();
  }
 
  /**update
   *
   * Updates the model with the content stored in the content argument
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.core.models.Project.toJSON()

    String projectId = "proj1";
    Project p = new Project("wpisuite", projectId);
   
    try
    {
      projects.makeEntity(originalSession, p.toJSON());
    }
    catch(ConflictException e)
    {
      // this is okay because it means the project already exists in the database.
    }
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.defecttracker.models.Comment.toJSON()

      final RequestObserver requestObserver = new SaveCommentObserver(this);
      final Request request = Network.getInstance().makeRequest(
          "defecttracker/comment", HttpMethod.PUT);
      final Comment comment = new Comment(model.getId(), model.getCreator(), view.getCommentField().getText());
      view.getCommentField().setText("");
      request.setBody(comment.toJSON());
      request.addObserver(requestObserver);
      request.send();
    }
  }
 
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.defecttracker.models.Defect.toJSON()

  }
 
  @Test
  public void testDeleteAll() throws WPISuiteException {
    Defect anotherDefect = new Defect(-1, "a title", "a description", existingUser);
    manager.makeEntity(defaultSession, anotherDefect.toJSON());
    assertEquals(2, db.retrieveAll(new Defect(), testProject).size());
    manager.deleteAll(adminSession);
    assertEquals(0, db.retrieveAll(new Defect(), testProject).size());
    // otherDefect should still be around
    assertEquals(1, db.retrieveAll(new Defect(), otherProject).size());
View Full Code Here

Examples of elemental.json.JsonValue.toJson()

      return o;
  }-*/;

  public static String toJson(Object o) {
    JsonValue value = reinterpret_cast(o);
    return value.toJson();
  }

  public static <T> T make(Object factory) {
    return ((Factory<T>) factory).create();
  }
View Full Code Here

Examples of eu.stratosphere.nephele.managementgraph.ManagementGroupVertex.toJson()

    ManagementGraph jobManagementGraph = jobmanager.getManagementGraph(jobEvent.getJobID());
   
    ManagementGroupVertex groupvertex = jobManagementGraph.getGroupVertexByID(groupvertexId);
   
    // Serialize ManagementGraph to json
    wrt.write("{\"groupvertex\": "+groupvertex.toJson()+",");
   
    wrt.write("\"verticetimes\": {");
    boolean first = true;
    for(ManagementGroupVertex groupVertex : jobManagementGraph.getGroupVerticesInTopologicalOrder()) {
     
View Full Code Here

Examples of fr.imag.adele.apam.distriman.dto.RemoteDependencyDeclaration.toJson()

  if (running.get()) {

      RemoteDependencyDeclaration remoteDep = new RemoteDependencyDeclaration(
        dependency, this.getURLRoot());

      ObjectNode jsonObject = remoteDep.toJson();

      String json = jsonObject.toString();

      Instance instance = createClientProxy(json, client, dependency);
View Full Code Here

Examples of gherkin.deps.com.google.gson.Gson.toJson()

                "    }\n" +
                "  ]\n" +
                "}\n";

        Gson gson = new Gson();
        String actual = gson.toJson(map);
        assertEquals(gson.fromJson(new StringReader(expected), Map.class), gson.fromJson(new StringReader(actual), Map.class));
    }

}
View Full Code Here

Examples of in.partake.model.dto.User.toJSON()

        User targetUser = transaction.execute();
        if (targetUser == null) {
            return renderInvalid(UserErrorCode.INVALID_ARGUMENT);
        } else {
            // Admin専用APIなのでtoSafeJSONの代わりにtoJSONを呼ぶ
            return renderOK(targetUser.toJSON());
        }
    }
}

class GetBanAPITransaction extends DBAccess<User> {
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.