|
|
|
@ -299,7 +299,7 @@ public class Jackson2ObjectMapperBuilder { |
|
|
|
* @param mixinSource class (or interface) whose annotations are to be "added" |
|
|
|
* @param mixinSource class (or interface) whose annotations are to be "added" |
|
|
|
* to target's annotations as value |
|
|
|
* to target's annotations as value |
|
|
|
* @since 4.1.2 |
|
|
|
* @since 4.1.2 |
|
|
|
* @see com.fasterxml.jackson.databind.ObjectMapper#addMixInAnnotations(Class, Class) |
|
|
|
* @see com.fasterxml.jackson.databind.ObjectMapper#addMixIn(Class, Class) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public Jackson2ObjectMapperBuilder mixIn(Class<?> target, Class<?> mixinSource) { |
|
|
|
public Jackson2ObjectMapperBuilder mixIn(Class<?> target, Class<?> mixinSource) { |
|
|
|
this.mixIns.put(target, mixinSource); |
|
|
|
this.mixIns.put(target, mixinSource); |
|
|
|
@ -308,11 +308,11 @@ public class Jackson2ObjectMapperBuilder { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Add mix-in annotations to use for augmenting specified class or interface. |
|
|
|
* Add mix-in annotations to use for augmenting specified class or interface. |
|
|
|
* @param mixIns Map of entries with target classes (or interface) whose annotations |
|
|
|
* @param mixIns a Map of entries with target classes (or interface) whose annotations |
|
|
|
* to effectively override as key and mix-in classes (or interface) whose |
|
|
|
* to effectively override as key and mix-in classes (or interface) whose |
|
|
|
* annotations are to be "added" to target's annotations as value. |
|
|
|
* annotations are to be "added" to target's annotations as value. |
|
|
|
* @since 4.1.2 |
|
|
|
* @since 4.1.2 |
|
|
|
* @see com.fasterxml.jackson.databind.ObjectMapper#addMixInAnnotations(Class, Class) |
|
|
|
* @see com.fasterxml.jackson.databind.ObjectMapper#addMixIn(Class, Class) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public Jackson2ObjectMapperBuilder mixIns(Map<Class<?>, Class<?>> mixIns) { |
|
|
|
public Jackson2ObjectMapperBuilder mixIns(Map<Class<?>, Class<?>> mixIns) { |
|
|
|
this.mixIns.putAll(mixIns); |
|
|
|
this.mixIns.putAll(mixIns); |
|
|
|
@ -337,8 +337,8 @@ public class Jackson2ObjectMapperBuilder { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Configure a custom serializer for the given type. |
|
|
|
* Configure a custom serializer for the given type. |
|
|
|
* @see #serializers(JsonSerializer...) |
|
|
|
|
|
|
|
* @since 4.1.2 |
|
|
|
* @since 4.1.2 |
|
|
|
|
|
|
|
* @see #serializers(JsonSerializer...) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public Jackson2ObjectMapperBuilder serializerByType(Class<?> type, JsonSerializer<?> serializer) { |
|
|
|
public Jackson2ObjectMapperBuilder serializerByType(Class<?> type, JsonSerializer<?> serializer) { |
|
|
|
this.serializers.put(type, serializer); |
|
|
|
this.serializers.put(type, serializer); |
|
|
|
@ -482,6 +482,8 @@ public class Jackson2ObjectMapperBuilder { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Specify one or more modules to be registered with the {@link ObjectMapper}. |
|
|
|
* Specify one or more modules to be registered with the {@link ObjectMapper}. |
|
|
|
|
|
|
|
* Multiple invocations are not additive, the last one defines the modules to |
|
|
|
|
|
|
|
* register. |
|
|
|
* <p>Note: If this is set, no finding of modules is going to happen - not by |
|
|
|
* <p>Note: If this is set, no finding of modules is going to happen - not by |
|
|
|
* Jackson, and not by Spring either (see {@link #findModulesViaServiceLoader}). |
|
|
|
* Jackson, and not by Spring either (see {@link #findModulesViaServiceLoader}). |
|
|
|
* As a consequence, specifying an empty list here will suppress any kind of |
|
|
|
* As a consequence, specifying an empty list here will suppress any kind of |
|
|
|
@ -497,6 +499,8 @@ public class Jackson2ObjectMapperBuilder { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Set a complete list of modules to be registered with the {@link ObjectMapper}. |
|
|
|
* Set a complete list of modules to be registered with the {@link ObjectMapper}. |
|
|
|
|
|
|
|
* Multiple invocations are not additive, the last one defines the modules to |
|
|
|
|
|
|
|
* register. |
|
|
|
* <p>Note: If this is set, no finding of modules is going to happen - not by |
|
|
|
* <p>Note: If this is set, no finding of modules is going to happen - not by |
|
|
|
* Jackson, and not by Spring either (see {@link #findModulesViaServiceLoader}). |
|
|
|
* Jackson, and not by Spring either (see {@link #findModulesViaServiceLoader}). |
|
|
|
* As a consequence, specifying an empty list here will suppress any kind of |
|
|
|
* As a consequence, specifying an empty list here will suppress any kind of |
|
|
|
@ -514,6 +518,8 @@ public class Jackson2ObjectMapperBuilder { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Specify one or more modules to be registered with the {@link ObjectMapper}. |
|
|
|
* Specify one or more modules to be registered with the {@link ObjectMapper}. |
|
|
|
|
|
|
|
* Multiple invocations are not additive, the last one defines the modules |
|
|
|
|
|
|
|
* to register. |
|
|
|
* <p>Modules specified here will be registered after |
|
|
|
* <p>Modules specified here will be registered after |
|
|
|
* Spring's autodetection of JSR-310 and Joda-Time, or Jackson's |
|
|
|
* Spring's autodetection of JSR-310 and Joda-Time, or Jackson's |
|
|
|
* finding of modules (see {@link #findModulesViaServiceLoader}), |
|
|
|
* finding of modules (see {@link #findModulesViaServiceLoader}), |
|
|
|
@ -530,7 +536,8 @@ public class Jackson2ObjectMapperBuilder { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Specify one or more modules by class to be registered with |
|
|
|
* Specify one or more modules by class to be registered with |
|
|
|
* the {@link ObjectMapper}. |
|
|
|
* the {@link ObjectMapper}. Multiple invocations are not additive, |
|
|
|
|
|
|
|
* the last one defines the modules to register. |
|
|
|
* <p>Modules specified here will be registered after |
|
|
|
* <p>Modules specified here will be registered after |
|
|
|
* Spring's autodetection of JSR-310 and Joda-Time, or Jackson's |
|
|
|
* Spring's autodetection of JSR-310 and Joda-Time, or Jackson's |
|
|
|
* finding of modules (see {@link #findModulesViaServiceLoader}), |
|
|
|
* finding of modules (see {@link #findModulesViaServiceLoader}), |
|
|
|
|