Examples of toJSON()


Examples of org.openntf.domino.Document.toJson()

    try {
      Session s = Factory.getSession();
      Database currDb = s.getCurrentDatabase();
      View contacts = currDb.getView("AllContacts");
      Document doc = contacts.getFirstDocument();
      ExtLibUtil.getViewScope().put("javaTest", doc.toJson(true));
    } catch (Throwable t) {

    }
  }
}
View Full Code Here

Examples of org.openqa.selenium.firefox.FirefoxProfile.toJson()

                log.info("Firefox profile directory: {}", profileDir);
            }
            if (isRemote) {
                String json;
                try {
                    json = profile.toJson();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
                caps.setCapability(FirefoxDriver.PROFILE, json);
                log.info("Convert Firefox profile to JSON: {} bytes", json.length());
View Full Code Here

Examples of org.opensocial.explorer.specserver.api.GadgetSpec.toJSON()

    expectRequestAndResponse("/default");
    niceControl.replay();

    GadgetSpec mockSpec = createMock(GadgetSpec.class);
    JSONObject defaultGadgetJson = new JSONObject("{'foo':'bar'}");
    expect(mockSpec.toJSON()).andReturn(defaultGadgetJson);

    expect(registry.getDefaultGadget()).andReturn(mockSpec);
    replay(registry, mockSpec);

    servlet.doGet(request, response);
View Full Code Here

Examples of org.openstreetmap.osmosis.plugin.elasticsearch.model.entity.ESNode.toJson()

    BulkRequestBuilder bulkRequest = client.prepareBulk();
    for (Node node : nodes) {
      try {
        ESNode esNode = ESNode.Builder.buildFromEntity(node);
        bulkRequest.add(client.prepareIndex(indexName, esNode.getEntityType().getIndiceName(), esNode.getIdString())
            .setSource(esNode.toJson()));
      } catch (Exception exception) {
        LOG.warning(String.format("Unable to add Entity %s to bulk request, cause: %s",
            node.getId(), exception.getMessage()));
      }
    }
View Full Code Here

Examples of org.openstreetmap.osmosis.plugin.elasticsearch.model.entity.ESWay.toJson()

      try {
        int size = way.getWayNodes().size();
        ESShape shape = getShape(iterator, size);
        ESWay esWay = ESWay.Builder.buildFromEntity(way, shape);
        bulkRequest.add(client.prepareIndex(indexName, esWay.getEntityType().getIndiceName(), esWay.getIdString())
            .setSource(esWay.toJson()));
      } catch (Exception e) {
        LOG.warning(String.format("Unable to add Entity %s to bulk request, cause: %s",
            way.getId(), e.getMessage()));
      }
    }
View Full Code Here

Examples of org.pentaho.cdf.views.View.toJSON()

    s.append( contextObj.toString( 2 ) + "\n" );

    View view = ViewsEngine.getInstance().getView( ( viewId.isEmpty() ? action : viewId ), user );
    if ( view != null ) {
      s.append( "Dashboards.view = " );
      s.append( view.toJSON().toString( 2 ) + "\n" );
    }
    String storage = getStorage();
    if ( !"".equals( storage ) ) {
      s.append( "Dashboards.initialStorage = " );
      s.append( storage );
View Full Code Here

Examples of org.rat.free.security.makifx.base.stockpile.ExportSerializer.toJSON()

            plugin.onReadableSavingData(rn);
            readable.getMap().put(key, rn);
        });

        ExportSerializer export_manager = LooB.get().fromStock(ExportSerializer.class);
        export_manager.toJSON(readable, path);
    }

    private void exportToZip(@Nonnull File out) throws Exception {

        if (out == null) {
View Full Code Here

Examples of org.rat.free.security.makifx.core.base.stockpile.ExportSerializer.toJSON()

            plugin.onReadableSavingData(rn);
            readable.getMap().put(key, rn);
        });

        ExportSerializer export_manager = MakiDI.get().fromStock(ExportSerializer.class);
        export_manager.toJSON(readable, path);
    }

    private void exportToZip(@Nonnull File out) throws Exception {

        if (out == null) {
View Full Code Here

Examples of org.richfaces.component.ExtendedDataTableState.toJSON()

            IterationTableStateBean bean;

            @AfterPhase(Phase.INVOKE_APPLICATION)
            public void verify_table_state_updated() throws JSONException {
                ExtendedDataTableState beanState = new ExtendedDataTableState(bean.getWidthState());
                Assert.assertEquals("Backing bean table state should be updated", "270px", beanState.toJSON().getJSONObject("columnsWidthState").getString("column1"));

                FacesContext facesContext = FacesContext.getCurrentInstance();
                AbstractExtendedDataTable edtComponent = (AbstractExtendedDataTable) facesContext.getViewRoot().findComponent("myForm").findComponent("edt");
                ExtendedDataTableState tableState = new ExtendedDataTableState(edtComponent);
                Assert.assertEquals("EDT tableState should be updated", "270px", tableState.toJSON().getJSONObject("columnsWidthState").getString("column1"));
View Full Code Here

Examples of org.scotlandyard.engine.json.ExceptionJsonContainer.toJson()

  @Test  //TODO add description of what the test should do
  public void testNewExceptionJsonContainer()  {
    final Exception exp = new Exception("My Error");
    final ExceptionJsonContainer ejc = new ExceptionJsonContainer(exp);
    final String json = ejc.toJson();
   
    assertTrue("test json",json.contains("My Error"));
   
    final ExceptionJsonContainer conv = ejc.fromJson(json);
    assertEquals("test cast conversion 1",conv.message,"My Error");
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.