Package org.codehaus.jackson.node

Examples of org.codehaus.jackson.node.ObjectNode.findValue()


    {
        ObjectMapper mapper = getJaxbMapper();
        JsonSchema jsonSchema = mapper.generateJsonSchema(Address.class);
        ObjectNode root = jsonSchema.getSchemaNode();
        // should find two properties ("city", "state"), not just one...
        JsonNode itemsNode = root.findValue("properties");
        assertNotNull("Missing 'state' field", itemsNode.get("state"));
        assertNotNull("Missing 'city' field", itemsNode.get("city"));
        assertEquals(2, itemsNode.size());
    }
}
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.