Package com.fasterxml.jackson.databind.node

Examples of com.fasterxml.jackson.databind.node.ObjectNode.arrayNode()


    @Test
    public void pathCanReferToArrayContentsByIndex() {

        ObjectNode root = new ObjectMapper().createObjectNode();

        ArrayNode a = root.arrayNode();
        root.put("a", a);

        a.add(root.objectNode());
        a.add(root.objectNode());
        a.add(root.objectNode());
View Full Code Here


    @Test(expected = IllegalArgumentException.class)
    public void attemptToUsePropertyNameOnArrayNodeThrowsIllegalArgumentException() {

        ObjectNode root = new ObjectMapper().createObjectNode();

        ArrayNode a = root.arrayNode();
        root.put("a", a);

        resolver.resolve(root, "#/a/b");

    }
View Full Code Here

        rootNode.put("@context", "http://library.stanford.edu/iiif/image-api/1.1/context.json");
        rootNode.put("@id", aService + "/" + aPrefix + "/" + id);
        rootNode.put("width", getWidth());
        rootNode.put("height", getHeight());

        scaleFactors = rootNode.arrayNode();

        for (int index = 0; index < myLevel; index++) {
            scaleFactors.add(index + 1);
        }
View Full Code Here

        rootNode.put("scale_factors", scaleFactors);
        rootNode.put("tile_width", 256); // TODO: provide other tile size options?
        rootNode.put("tile_height", 256);

        formats = rootNode.arrayNode();

        for (final String format : getFormats()) {
            formats.add(format);
        }
View Full Code Here

        for (final String format : getFormats()) {
            formats.add(format);
        }

        rootNode.put("formats", formats);
        rootNode.put("qualities", rootNode.arrayNode().add("native"));
        rootNode.put("profile", Constants.IIIF_URL + "1.1/compliance.html#level1");

        return mapper.writeValueAsString(rootNode);
    }
View Full Code Here

      requestNode.put("candidateGroup", "sales");
      assertResultsPresentInPostDataResponse(url, requestNode, processTask.getId());

      // Candidate group In filtering
      requestNode.removeAll();
      ArrayNode arrayNode =  requestNode.arrayNode();
     
      arrayNode.add("sales");
      arrayNode.add("someOtherGroup");
     
      requestNode.put("candidateGroupIn", arrayNode);
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.