Examples of toJSONString()


Examples of edu.brown.designer.partitioners.plan.PartitionPlan.toJSONString()

        PartitionPlan pplan = PartitionPlan.createFromMap(m);
        assertNotNull(pplan);
//        pplan.save("/tmp/tm1.manual.pplan");
       
        String json = pplan.toJSONString();
        assertFalse(json.isEmpty());
        JSONObject json_object = new JSONObject(json);
        assertNotNull(json_object);
       
        PartitionPlan clone = new PartitionPlan();
View Full Code Here

Examples of edu.isi.karma.kr2rml.ErrorReport.toJSONString()

          try {
            outputObject.put(PublishRDFCommandJsonKeys.updateType.name(), "PublishRDFUpdate");
            outputObject.put(PublishRDFCommandJsonKeys.fileUrl.name(),
                ServletContextParameterMap.getParameterValue(ContextParameter.RDF_PUBLISH_RELATIVE_DIR) + rdfFileName);
            outputObject.put(PublishRDFCommandJsonKeys.worksheetId.name(), worksheetId);
            outputObject.put(PublishRDFCommandJsonKeys.errorReport.name(), errorReport.toJSONString());
            pw.println(outputObject.toString(4));
          } catch (JSONException e) {
            logger.error("Error occured while generating JSON!");
          }
        }
View Full Code Here

Examples of hu.sztaki.ilab.longneck.process.SourceInfo.toJSONString()

            // Create source info and add serialized form as attribute.
            SourceInfo pframe = new SourceInfo(documentUrl,
                    (! blockStack.isEmpty()) ? blockStack.peekLast() : null,
                    sequenceCounter, locator.getLineNumber(), locator.getColumnNumber());
            element.setAttribute("source-info", pframe.toJSONString());

            // Increase sequence counter.
            ++sequenceCounter;
           
            // Add and set current
View Full Code Here

Examples of net.minidev.json.JSONObject.toJSONString()

        logstashEvent.put("@source_path", source_path);
        logstashEvent.put("@message", message);
        logstashEvent.put("@tags", tags);
        logstashEvent.put("@fields",additionalFields);

        return logstashEvent.toJSONString();
    }

    public String getSource() {
        return source;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.json.JSONObject.toJSONString()

        result.put("code", code);
        result.put("objectId", objectId == null ? "" : objectId);
        result.put("exception", ex == null ? "" : ex);
        result.put("message", message == null ? "" : message);

        return result.toJSONString();
    }

    /**
     * Writes JSON to the servlet response and adds a callback wrapper if
     * requested.
 
View Full Code Here

Examples of org.apache.drill.common.logical.LogicalPlan.toJsonString()

  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Simple.class);
 
  public static void main(String[] args) throws Exception {
    DrillConfig c = DrillConfig.create();
    LogicalPlan plan = LogicalPlan.parse(c, FileUtils.getResourceAsString("/jdbc_plan.json"));
    System.out.println(plan.toJsonString(c));
  }
 
}
View Full Code Here

Examples of org.apache.olingo.odata2.core.uri.ExpandSelectTreeNodeImpl.toJsonString()

        String expandSelectString;
        try {
          ExpandSelectTreeCreator expandSelectCreator =
              new ExpandSelectTreeCreator(uriInfo.getSelect(), uriInfo.getExpand());
          final ExpandSelectTreeNodeImpl expandSelectTree = expandSelectCreator.create();
          expandSelectString = expandSelectTree.toJsonString();
        } catch (final EdmException e) {
          expandSelectString = null;
        }
        jsonStreamWriter.name("expand/select").unquotedValue(expandSelectString);
      }
View Full Code Here

Examples of org.apache.shindig.gadgets.spec.MessageBundle.toJSONString()

  private void injectMessageBundles(Gadget gadget, Node scriptTag) throws GadgetException {
    GadgetContext context = gadget.getContext();
    MessageBundle bundle = messageBundleFactory.getBundle(
        gadget.getSpec(), context.getLocale(), context.getIgnoreCache());

    String msgs = bundle.toJSONString();

    Text text = scriptTag.getOwnerDocument().createTextNode("gadgets.Prefs.setMessages_(");
    text.appendData(msgs);
    text.appendData(");");
    scriptTag.appendChild(text);
View Full Code Here

Examples of org.apache.slider.api.ClusterDescription.toJsonString()

                                              IOException {
    verifyBindingsDefined();
    SliderUtils.validateClusterName(clustername);
    String outfile = statusArgs.getOutput();
    ClusterDescription status = getClusterDescription(clustername);
    String text = status.toJsonString();
    if (outfile == null) {
      log.info(text);
    } else {
      status.save(new File(outfile).getAbsoluteFile());
    }
View Full Code Here

Examples of org.apache.slider.api.ClusterDescription.toJsonString()

    String result;
    //quick update
    //query and json-ify
    ClusterDescription cd;
    cd = getCurrentClusterStatus();
    result = cd.toJsonString();
    String stat = result;
    return Messages.GetJSONClusterStatusResponseProto.newBuilder()
      .setClusterSpec(stat)
      .build();
  }
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.