2121 * as well as some other commonly
2222 * needed aspects (addition of custom {@link AbstractTypeResolver}s,
2323 * {@link com.fasterxml.jackson.databind.deser.ValueInstantiator}s).
24+ * <p>
25+ * NOTE: that [de]serializers are registered as "default" [de]serializers.
26+ * As a result, they will have lower priority than the ones indicated through annotations on
27+ * both Class and property-associated annotations -- for example,
28+ * {@link com.fasterxml.jackson.databind.annotation.JsonDeserialize}.<br/>
29+ * In cases where both module-based [de]serializers and annotation-based [de]serializers are registered,
30+ * the [de]serializer specified by the annotation will take precedence.
2431 *<p>
2532 * NOTE: although it is not expected that sub-types should need to
2633 * override {@link #setupModule(SetupContext)} method, if they choose
@@ -309,6 +316,8 @@ protected SimpleModule setNamingStrategy(PropertyNamingStrategy naming) {
309316 * WARNING! Type matching only uses type-erased {@code Class} and should NOT
310317 * be used when registering serializers for generic types like
311318 * {@link java.util.Collection} and {@link java.util.Map}.
319+ * <p>
320+ * NOTE: This method registers "default" (de)serializers only. See a note on precedence in class JavaDoc.
312321 */
313322 public SimpleModule addSerializer (JsonSerializer <?> ser )
314323 {
@@ -326,6 +335,8 @@ public SimpleModule addSerializer(JsonSerializer<?> ser)
326335 * WARNING! Type matching only uses type-erased {@code Class} and should NOT
327336 * be used when registering serializers for generic types like
328337 * {@link java.util.Collection} and {@link java.util.Map}.
338+ * <p>
339+ * NOTE: This method registers "default" (de)serializers only. See a note on precedence in class JavaDoc.
329340 */
330341 public <T > SimpleModule addSerializer (Class <? extends T > type , JsonSerializer <T > ser )
331342 {
@@ -338,6 +349,9 @@ public <T> SimpleModule addSerializer(Class<? extends T> type, JsonSerializer<T>
338349 return this ;
339350 }
340351
352+ /**
353+ * NOTE: This method registers "default" (de)serializers only. See a note on precedence in class JavaDoc.
354+ */
341355 public <T > SimpleModule addKeySerializer (Class <? extends T > type , JsonSerializer <T > ser )
342356 {
343357 _checkNotNull (type , "type to register key serializer for" );
@@ -361,6 +375,8 @@ public <T> SimpleModule addKeySerializer(Class<? extends T> type, JsonSerializer
361375 * WARNING! Type matching only uses type-erased {@code Class} and should NOT
362376 * be used when registering serializers for generic types like
363377 * {@link java.util.Collection} and {@link java.util.Map}.
378+ * <p>
379+ * NOTE: This method registers "default" (de)serializers only. See a note on precedence in class JavaDoc.
364380 */
365381 public <T > SimpleModule addDeserializer (Class <T > type , JsonDeserializer <? extends T > deser )
366382 {
@@ -373,6 +389,9 @@ public <T> SimpleModule addDeserializer(Class<T> type, JsonDeserializer<? extend
373389 return this ;
374390 }
375391
392+ /**
393+ * NOTE: This method registers "default" (de)serializers only. See a note on precedence in class JavaDoc.
394+ */
376395 public SimpleModule addKeyDeserializer (Class <?> type , KeyDeserializer deser )
377396 {
378397 _checkNotNull (type , "type to register key deserializer for" );
0 commit comments