Package com.fasterxml.jackson.databind.ser.std

Examples of com.fasterxml.jackson.databind.ser.std.StdDelegatingSerializer


    // [Issue#87]: delegating serializer
    public void testDelegating() throws Exception
    {
        ObjectMapper mapper = new ObjectMapper();
        SimpleModule module = new SimpleModule("test", Version.unknownVersion());
        module.addSerializer(new StdDelegatingSerializer(Immutable.class,
                new StdConverter<Immutable, Map<String,Integer>>() {
                    @Override
                    public Map<String, Integer> convert(Immutable value)
                    {
                        HashMap<String,Integer> map = new LinkedHashMap<String,Integer>();
View Full Code Here


        JavaType delegateType = conv.getOutputType(prov.getTypeFactory());
        // One more twist, as per [Issue#288]; probably need to get new BeanDesc
        if (!delegateType.hasRawClass(type.getRawClass())) {
            beanDesc = config.introspect(delegateType);
        }
        return new StdDelegatingSerializer(conv, delegateType,
                _createSerializer2(prov, delegateType, beanDesc, true));
    }
View Full Code Here

        JavaType delegateType = conv.getOutputType(prov.getTypeFactory());
        // One more twist, as per [Issue#288]; probably need to get new BeanDesc
        if (!delegateType.hasRawClass(type.getRawClass())) {
            beanDesc = config.introspect(delegateType);
        }
        return new StdDelegatingSerializer(conv, delegateType,
                _createSerializer2(prov, delegateType, beanDesc, true));
    }
View Full Code Here

        JavaType delegateType = conv.getOutputType(prov.getTypeFactory());
        // One more twist, as per [Issue#288]; probably need to get new BeanDesc
        if (!delegateType.hasRawClass(type.getRawClass())) {
            beanDesc = config.introspect(delegateType);
        }
        return new StdDelegatingSerializer(conv, delegateType,
                _createSerializer2(prov, delegateType, beanDesc, true));
    }
View Full Code Here

        JavaType delegateType = conv.getOutputType(prov.getTypeFactory());
        // One more twist, as per [Issue#288]; probably need to get new BeanDesc
        if (!delegateType.hasRawClass(type.getRawClass())) {
            beanDesc = config.introspect(delegateType);
        }
        return new StdDelegatingSerializer(conv, delegateType,
                _createSerializer2(prov, delegateType, beanDesc, true));
    }
View Full Code Here

            ser = findSerializerFromAnnotation(prov, beanDesc.getClassInfo());
        }
        if (ser == null) {
            ser = _createSerializer2(prov, delegateType, beanDesc, true);
        }
        return new StdDelegatingSerializer(conv, delegateType, ser);
    }
View Full Code Here

        Converter<Object,Object> conv = beanDesc.findSerializationConverter();
        if (conv == null) { // no, simple:
            return (JsonSerializer<Object>) _createSerializer2(prov, type, beanDesc, staticTyping);
        }
        JavaType delegateType = conv.getOutputType(prov.getTypeFactory());
        return new StdDelegatingSerializer(conv, delegateType,
                _createSerializer2(prov, delegateType, beanDesc, true));
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.ser.std.StdDelegatingSerializer

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.