Hi all Time and again whenever I want to configure a mapper to do something more than reading/writing POJOS, I end up bumping here:
https://github.com/FasterXML/jackson-databind/blob/b2487d0a33a347ce476282f94a0a125f2adcb559/src/main/java/com/fasterxml/jackson/databind/module/SimpleSerializers.java#L27 Where I read: /** * Simple implementation {@link Serializers} which allows registration of * serializers based on raw (type erased class). * It can work well for basic bean and scalar type serializers, but is not * a good fit for handling generic types (like {@link Map}s and {@link Collection}s). [...] */ Then I am puzzled because I have no idea on what a 'good fit' could be: * I usually end up hammering a solution that does not look like a good fit (because it still uses SimpleSerializers & SimpleDeserializers) * and it feels I am repeating work that might be already done in the library. *Could you give examples/pointers* to e.g. create a module with 'good fits' to handle generic types, both serializing and deserializing them? E.g. where should I look to define a module that * does not use `SimpleSerializers`, because... * has custom serializer/deserializer for * `Collection<Integer>` * `Collection<BigDecimal>` * `Map<Integer, List<String>>` * and uses defaults for all other types Many thanks in advance. -gapag -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/11686ce1-1877-43e1-b5be-8d1227fcfeb7n%40googlegroups.com.
