Package com.fasterxml.jackson.databind.jsonFormatVisitors

Examples of com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor$Base


        throws JsonMappingException
    {
        if (visitor == null) {
            return;
        }
        JsonObjectFormatVisitor objectVisitor = visitor.expectObjectFormat(typeHint);
        if (objectVisitor == null) {
            return;
        }
        JavaType valueType = typeHint.containedType(1);
        JsonSerializer<Object> ser = _valueSerializer;
        if (ser == null && valueType != null) {
            ser = visitor.getProvider().findValueSerializer(valueType, _property);
        }
        if (valueType == null) {
            valueType = visitor.getProvider().constructType(Object.class);
        }
        EnumValues keyEnums = _keyEnums;
        if (keyEnums == null) {
            JavaType enumType = typeHint.containedType(0);
             if (enumType == null) {
                 throw new IllegalStateException("Can not resolve Enum type of EnumMap: "+typeHint);
             }
             JsonSerializer<?> enumSer = visitor.getProvider().findValueSerializer(enumType, _property);
             if (!(enumSer instanceof EnumSerializer)) {
                 throw new IllegalStateException("Can not resolve Enum type of EnumMap: "+typeHint);
             }
             keyEnums = ((EnumSerializer) enumSer).getEnumValues();
        }
        for (Map.Entry<?,SerializableString> entry : keyEnums.internalMap().entrySet()) {
            String name = entry.getValue().getValue();
            // should all have the same type, so:
            if (ser == null) {
                ser = visitor.getProvider().findValueSerializer(entry.getKey().getClass(), _property);
            }
            objectVisitor.property(name, (JsonFormatVisitable) ser, valueType);
        }
    }
View Full Code Here


    {
        //deposit your output format
        if (visitor == null) {
            return;
        }
        JsonObjectFormatVisitor objectVisitor = visitor.expectObjectFormat(typeHint);
        if (objectVisitor == null) {
            return;
        }
        if (_propertyFilterId != null) {
            PropertyFilter filter = findPropertyFilter(visitor.getProvider(),
View Full Code Here

    @Override
    public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
        throws JsonMappingException
    {
        if (visitor != null) {
            JsonObjectFormatVisitor objectVisitor = visitor.expectObjectFormat(typeHint);
            if (objectVisitor != null) {
                if (_endpointSerializer != null) {
                    JavaType endpointType = _rangeType.containedType(0);
                    JavaType btType = visitor.getProvider().constructType(BoundType.class);
                    JsonSerializer<?> btSer = visitor.getProvider()
                            .findValueSerializer(btType, null);
                    objectVisitor.property("lowerEndpoint", _endpointSerializer, endpointType);
                    objectVisitor.property("lowerBoundType", btSer, btType);
                    objectVisitor.property("upperEndpoint", _endpointSerializer, endpointType);
                    objectVisitor.property("upperBoundType", btSer, btType);
                }
            }
        }
    }
View Full Code Here

    {
        //deposit your output format
        if (visitor == null) {
            return;
        }
        JsonObjectFormatVisitor objectVisitor = visitor.expectObjectFormat(typeHint);
        if (objectVisitor == null) {
            return;
        }
        if (_propertyFilterId != null) {
            PropertyFilter filter = findPropertyFilter(visitor.getProvider(),
View Full Code Here

    {
        //deposit your output format
        if (visitor == null) {
            return;
        }
        JsonObjectFormatVisitor objectVisitor = visitor.expectObjectFormat(typeHint);
        if (objectVisitor == null) {
            return;
        }
        if (_propertyFilterId != null) {
            PropertyFilter filter = findPropertyFilter(visitor.getProvider(),
View Full Code Here

    @Override
    public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
        throws JsonMappingException
    {
        //deposit your output format
        JsonObjectFormatVisitor objectVisitor = (visitor == null) ? null : visitor.expectObjectFormat(typeHint);
        if (objectVisitor != null) {
            if (_propertyFilterId != null) {
                BeanPropertyFilter filter = findFilter(visitor.getProvider());
                for (int i = 0; i < _props.length; i++) {
                    filter.depositSchemaProperty(_props[i], objectVisitor, visitor.getProvider());
View Full Code Here

        throws JsonMappingException
    {
        if (visitor == null) {
            return;
        }
        JsonObjectFormatVisitor objectVisitor = visitor.expectObjectFormat(typeHint);
        if (objectVisitor == null) {
            return;
        }
        JavaType valueType = typeHint.containedType(1);
        JsonSerializer<Object> ser = _valueSerializer;
        if (ser == null && valueType != null) {
            ser = visitor.getProvider().findValueSerializer(valueType, _property);
        }
        if (valueType == null) {
            valueType = visitor.getProvider().constructType(Object.class);
        }
        EnumValues keyEnums = _keyEnums;
        if (keyEnums == null) {
            JavaType enumType = typeHint.containedType(0);
             if (enumType == null) {
                 throw new IllegalStateException("Can not resolve Enum type of EnumMap: "+typeHint);
             }
             JsonSerializer<?> enumSer = (enumType == null) ? null :
                 visitor.getProvider().findValueSerializer(enumType, _property);
             if (!(enumSer instanceof EnumSerializer)) {
                 throw new IllegalStateException("Can not resolve Enum type of EnumMap: "+typeHint);
             }
             keyEnums = ((EnumSerializer) enumSer).getEnumValues();
        }
        for (Map.Entry<?,SerializedString> entry : keyEnums.internalMap().entrySet()) {
            String name = entry.getValue().getValue();
            // should all have the same type, so:
            if (ser == null) {
                ser = visitor.getProvider().findValueSerializer(entry.getKey().getClass(), _property);
            }
            objectVisitor.property(name, (JsonFormatVisitable) ser, valueType);
        }
    }
View Full Code Here

        if (visitor == null) {
            return;
        }


        JsonObjectFormatVisitor objectVisitor = visitor.expectObjectFormat(typeHint);
        if (objectVisitor == null) {
            return;
        }

        Set<JavaType> visited = visitedThreadLocal.get();
View Full Code Here

    {
        //deposit your output format
        if (visitor == null) {
            return;
        }
        JsonObjectFormatVisitor objectVisitor = visitor.expectObjectFormat(typeHint);
        if (objectVisitor == null) {
            return;
        }
        if (_propertyFilterId != null) {
            PropertyFilter filter = findPropertyFilter(visitor.getProvider(),
View Full Code Here

        throws JsonMappingException
    {
        if (visitor == null) {
            return;
        }
        JsonObjectFormatVisitor objectVisitor = visitor.expectObjectFormat(typeHint);
        if (objectVisitor == null) {
            return;
        }
        JavaType valueType = typeHint.containedType(1);
        JsonSerializer<Object> ser = _valueSerializer;
        if (ser == null && valueType != null) {
            ser = visitor.getProvider().findValueSerializer(valueType, _property);
        }
        if (valueType == null) {
            valueType = visitor.getProvider().constructType(Object.class);
        }
        EnumValues keyEnums = _keyEnums;
        if (keyEnums == null) {
            JavaType enumType = typeHint.containedType(0);
             if (enumType == null) {
                 throw new IllegalStateException("Can not resolve Enum type of EnumMap: "+typeHint);
             }
             JsonSerializer<?> enumSer = visitor.getProvider().findValueSerializer(enumType, _property);
             if (!(enumSer instanceof EnumSerializer)) {
                 throw new IllegalStateException("Can not resolve Enum type of EnumMap: "+typeHint);
             }
             keyEnums = ((EnumSerializer) enumSer).getEnumValues();
        }
        for (Map.Entry<?,SerializedString> entry : keyEnums.internalMap().entrySet()) {
            String name = entry.getValue().getValue();
            // should all have the same type, so:
            if (ser == null) {
                ser = visitor.getProvider().findValueSerializer(entry.getKey().getClass(), _property);
            }
            objectVisitor.property(name, (JsonFormatVisitable) ser, valueType);
        }
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor$Base

Copyright © 2018 www.massapicom. 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.