Jackson module signature prevents addings serializers for self-referencing generic types
问题 I want to add a custom serializer and deserializer for JSR 363 javax.measure.Quantity<Q extends Quantity<Q>> , which basically encapsulates a "value" and a "unit". Creating the serializer ( extends JsonSerializer<Quantity<?>> ) and the deserializer ( extends StdDeserializer<Quantity<?>> ) is easy. But it's not easy to register them. For deserializers, it's OK; look at the signature: SimpleModule.addDeserializer(Class<T> type, JsonDeserializer<? extends T> deser) Notice that the deserializer