Examples of POJONode


Examples of com.fasterxml.jackson.databind.node.POJONode

    }

    public void testBinaryPojo() throws Exception
    {
        byte[] inputBinary = new byte[] { 1, 2, 100 };
        POJONode n = new POJONode(inputBinary);
        JsonParser jp = n.traverse();

        assertNull(jp.getCurrentToken());
        assertToken(JsonToken.VALUE_EMBEDDED_OBJECT, jp.nextToken());
        byte[] data = jp.getBinaryValue();
        assertNotNull(data);
View Full Code Here

Examples of org.codehaus.jackson.node.POJONode

    public JsonRepresentation arrayAdd(final Object value) {
        if (!isArray()) {
            throw new IllegalStateException("does not represent array");
        }
        asArrayNode().add(new POJONode(value));
        return this;
    }
View Full Code Here

Examples of org.codehaus.jackson.node.POJONode

        if (!isMap()) {
            throw new IllegalStateException("does not represent map");
        }
        final Path path = Path.parse(key);
        final ObjectNode node = JsonNodeUtils.walkNodeUpTo(asObjectNode(), path.getHead());
        node.put(path.getTail(), value != null? new POJONode(value): NullNode.getInstance() );
        return this;
    }
View Full Code Here

Examples of org.codehaus.jackson.node.POJONode

    public JsonRepresentation arrayAdd(final Object value) {
        if (!isArray()) {
            throw new IllegalStateException("does not represent array");
        }
        asArrayNode().add(new POJONode(value));
        return this;
    }
View Full Code Here

Examples of org.codehaus.jackson.node.POJONode

        if (!isMap()) {
            throw new IllegalStateException("does not represent map");
        }
        final Path path = Path.parse(key);
        final ObjectNode node = JsonNodeUtils.walkNodeUpTo(asObjectNode(), path.getHead());
        node.put(path.getTail(), value != null ? new POJONode(value) : NullNode.getInstance());
        return this;
    }
View Full Code Here

Examples of org.codehaus.jackson.node.POJONode

    public void arrayAdd(final Object value) {
        if (!isArray()) {
            throw new IllegalStateException("does not represent array");
        }
        asArrayNode().add(new POJONode(value));
    }
View Full Code Here

Examples of org.codehaus.jackson.node.POJONode

        if (value == null) {
            return;
        }
        final Path path = Path.parse(key);
        final ObjectNode node = JsonNodeUtils.walkNodeUpTo(asObjectNode(), path.getHead());
        node.put(path.getTail(), new POJONode(value));
    }
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.