Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.JsonNode.traverse()


            if ( arrayNode == null || arrayNode.isMissingNode() || ! arrayNode.isArray() ) {
                throw new RuntimeException( "Invalid format of LogicalFilter encountered." );
            }

            // pass in our objectCodec so that the subJsonParser knows about our configured Modules and Annotations
            JsonParser subJsonParser = arrayNode.traverse( objectCodec );
            List<QueryFilter> childrenQueryFilters = subJsonParser.readValueAs( new TypeReference<List<QueryFilter>>() {} );

            return new LogicalFilter2( QueryParam.valueOf( key ), childrenQueryFilters );
        }
    }
View Full Code Here


            if ( arrayNode == null || arrayNode.isMissingNode() || ! arrayNode.isArray() ) {
                throw new RuntimeException( "Invalid format of LogicalFilter encountered." );
            }

            // pass in our objectCodec so that the subJsonParser knows about our configured Modules and Annotations
            JsonParser subJsonParser = arrayNode.traverse( objectCodec );
            List<QueryFilter> childrenQueryFilters = subJsonParser.readValueAs( new TypeReference<List<QueryFilter>>() {} );

            return new LogicalFilter3( QueryParam.valueOf( key ), childrenQueryFilters );
        }
    }
View Full Code Here

        String format = Utils.getStringFromJsonNode(node, "format");
        parameter.setDataType(SwaggerSerializers.fromJsonSchemaType(new Tuple2<String, String>(type, format)));

        JsonNode jsonNode = node.get("items");
        if (jsonNode != null) {
            JModelRef items = jsonNode.traverse(jp.getCodec()).readValueAs(JModelRef.class);

            if ("array".equalsIgnoreCase(type)) {
                if (Utils.getBooleanFromJsonNode(node, "uniqueItems")) {
                    parameter.setDataType("Set["+items.getRef()+"]");
                } else {
View Full Code Here

        String $ref = node.get("$ref")== null ? null : node.get("$ref").asText();
        jModelProperty.set$ref($ref);
       
        JsonNode jsonNode = node.get("items");
        if (jsonNode != null) {
            JModelRef items = jsonNode.traverse(jp.getCodec()).readValueAs(JModelRef.class);
            jModelProperty.setItems(items);
            if ("array".equalsIgnoreCase(type)) {
                if (Utils.getBooleanFromJsonNode(node, "uniqueItems")) {
                    jModelProperty.setType("Set");
                } else {
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.