Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.ObjectMapper.createObjectNode()


   * @return a JSON representation of this filter
   */
  public ObjectNode toJson() {
    ObjectMapper mapper = new ObjectMapper();
    ObjectNode node = mapper.createObjectNode();
    ObjectNode attributeNode = mapper.createObjectNode();

    node.put(attribute.getCode(), attributeNode);
    attributeNode.put("op", operation.getOp());

    return node;
View Full Code Here


        writeTo(new OutputStreamWriter(stream, Charset.forName("UTF-8")));
    }

    public void writeTo(Writer writer) throws IOException {
        ObjectMapper mapper = new ObjectMapper();
        ObjectNode obj = mapper.createObjectNode();
        obj.set("collection", asJson());
        mapper.writeValue(writer, obj);
    }

    @Override
View Full Code Here

            @ApiParam(value = "Id of the job.", required = true)
            @PathParam("id")
            final String id) throws GenieException {
        LOG.info("Called for job id:" + id);
        final ObjectMapper mapper = new ObjectMapper();
        final ObjectNode node = mapper.createObjectNode();
        node.put("status", this.jobService.getJobStatus(id).toString());
        return node;
    }

    /**
 
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.