Describe your Issue
SerializationContext
contains a series of find*Serializer
methods, all of which return ValueSerializer<Object>
.
It would be much more convenient and type-safe if they admitted a generic type parameter. For instance:
public <V> ValueSerializer<V> findValueSerializer(Class<V> type)
Comment From: cowtowncoder
Based on my experiences with Jackson versions up to 2.19, adding type parameters in these specific cases is counter-productive, adding unnecessary casts on caller end, while providing little benefit to anyone.
Almost all internal databind code will just need to case nominal type down to Object
.