Examples of JsonArrayFormatVisitor


Examples of com.fasterxml.jackson.databind.jsonFormatVisitors.JsonArrayFormatVisitor

         *    more information about content type is actually being explicitly
         *    passed. So there should be less need to try to re-process that
         *    information.
         */
        //ObjectNode o = createSchemaNode("array", true);
        JsonArrayFormatVisitor arrayVisitor = visitor.expectArrayFormat(typeHint);
        JavaType contentType = null;
        if (typeHint != null) {
            contentType = typeHint.getContentType();
            if (contentType == null) { // could still be parameterized (Iterators)
                // 30-Sep-2012, tatu: This is wrong, should use TypeFactory... but it is alas
                //    not being passed (oversight)
                if (typeHint instanceof ParameterizedType) {
                    Type[] typeArgs = ((ParameterizedType) typeHint).getActualTypeArguments();
                    if (typeArgs.length == 1) {
                        contentType = visitor.getProvider().constructType(typeArgs[0]);
                    }
                }
            }
        }
        if (contentType == null && _elementType != null) {
            contentType = _elementType;
        }
        if (contentType != null) {
//            JsonNode schemaNode = null;
            arrayVisitor.itemsFormat(contentType);
        }
    }
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.