Uses of Class
org.springframework.http.converter.json.Jackson2ObjectMapperBuilder
Packages that use Jackson2ObjectMapperBuilder
Package
Description
Provides HttpMessageConverter implementations for handling JSON.
-
Uses of Jackson2ObjectMapperBuilder in org.springframework.http.converter.json
Methods in org.springframework.http.converter.json that return Jackson2ObjectMapperBuilderModifier and TypeMethodDescriptionJackson2ObjectMapperBuilder.annotationIntrospector(AnnotationIntrospector annotationIntrospector) Set anAnnotationIntrospectorfor both serialization and deserialization.Jackson2ObjectMapperBuilder.annotationIntrospector(Function<AnnotationIntrospector, AnnotationIntrospector> pairingFunction) Alternative toannotationIntrospector(AnnotationIntrospector)that allows combining with rather than replacing the currently set introspector, for example, viaAnnotationIntrospector.pair(AnnotationIntrospector, AnnotationIntrospector).Jackson2ObjectMapperBuilder.applicationContext(ApplicationContext applicationContext) Set the SpringApplicationContextin order to autowire Jackson handlers (JsonSerializer,JsonDeserializer,KeyDeserializer,TypeResolverBuilderandTypeIdResolver).Jackson2ObjectMapperBuilder.autoDetectFields(boolean autoDetectFields) Shortcut forMapperFeature.AUTO_DETECT_FIELDSoption.Jackson2ObjectMapperBuilder.autoDetectGettersSetters(boolean autoDetectGettersSetters) static Jackson2ObjectMapperBuilderJackson2ObjectMapperBuilder.cbor()Obtain aJackson2ObjectMapperBuilderinstance in order to build a CBOR data formatObjectMapperinstance.Jackson2ObjectMapperBuilder.createXmlMapper(boolean createXmlMapper) If set totrue, anXmlMapperwill be created using its default constructor.Jackson2ObjectMapperBuilder.dateFormat(DateFormat dateFormat) Define the format for date/time with the givenDateFormat.Jackson2ObjectMapperBuilder.defaultTyping(TypeResolverBuilder<?> typeResolverBuilder) Specify aTypeResolverBuilderto use for Jackson's default typing.Jackson2ObjectMapperBuilder.defaultUseWrapper(boolean defaultUseWrapper) Define if a wrapper will be used for indexed (List, array) properties or not by default (only applies toXmlMapper).Jackson2ObjectMapperBuilder.defaultViewInclusion(boolean defaultViewInclusion) Shortcut forMapperFeature.DEFAULT_VIEW_INCLUSIONoption.Jackson2ObjectMapperBuilder.deserializerByType(Class<?> type, JsonDeserializer<?> deserializer) Configure a custom deserializer for the given type.Jackson2ObjectMapperBuilder.deserializers(JsonDeserializer<?>... deserializers) Configure custom deserializers.Jackson2ObjectMapperBuilder.deserializersByType(Map<Class<?>, JsonDeserializer<?>> deserializers) Configure custom deserializers for the given types.Jackson2ObjectMapperBuilder.factory(JsonFactory factory) Define theJsonFactoryto be used to create theObjectMapperinstance.Jackson2ObjectMapperBuilder.failOnEmptyBeans(boolean failOnEmptyBeans) Shortcut forSerializationFeature.FAIL_ON_EMPTY_BEANSoption.Jackson2ObjectMapperBuilder.failOnUnknownProperties(boolean failOnUnknownProperties) Shortcut forDeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIESoption.Jackson2ObjectMapperBuilder.featuresToDisable(Object... featuresToDisable) Specify features to disable.Jackson2ObjectMapperBuilder.featuresToEnable(Object... featuresToEnable) Specify features to enable.Jackson2ObjectMapperBuilder.filters(FilterProvider filters) Set the global filters to use in order to support@JsonFilterannotated POJO.Jackson2ObjectMapperBuilder.findModulesViaServiceLoader(boolean findModules) Set whether to let Jackson find available modules via the JDK ServiceLoader, based on META-INF metadata in the classpath.Jackson2ObjectMapperBuilder.handlerInstantiator(HandlerInstantiator handlerInstantiator) Customize the construction of Jackson handlers (JsonSerializer,JsonDeserializer,KeyDeserializer,TypeResolverBuilderandTypeIdResolver).Jackson2ObjectMapperBuilder.indentOutput(boolean indentOutput) Shortcut forSerializationFeature.INDENT_OUTPUToption.static Jackson2ObjectMapperBuilderJackson2ObjectMapperBuilder.json()Obtain aJackson2ObjectMapperBuilderinstance in order to build a regular JSONObjectMapperinstance.Override the defaultLocaleto use for formatting.Override the defaultLocaleto use for formatting.Add mix-in annotations to use for augmenting specified class or interface.Add mix-in annotations to use for augmenting specified class or interface.Jackson2ObjectMapperBuilder.moduleClassLoader(ClassLoader moduleClassLoader) Set the ClassLoader to use for loading Jackson extension modules.Specify the modules to be registered with theObjectMapper.Variant ofmodules(Module...)with aConsumerfor full control over the underlying list of modules.Variant ofmodules(Module...)with aList.Jackson2ObjectMapperBuilder.modulesToInstall(Module... modules) Specify one or more modules to be registered with theObjectMapper.Jackson2ObjectMapperBuilder.modulesToInstall(Class<? extends Module>... modules) Specify one or more modules by class to be registered with theObjectMapper.Jackson2ObjectMapperBuilder.modulesToInstall(Consumer<List<Module>> consumer) Variant ofmodulesToInstall(Module...)with aConsumerfor full control over the underlying list of modules.Jackson2ObjectMapperBuilder.postConfigurer(Consumer<ObjectMapper> configurer) An option to apply additional customizations directly to theObjectMapperinstances at the end, after all other config properties of the builder have been applied.Jackson2ObjectMapperBuilder.propertyNamingStrategy(PropertyNamingStrategy propertyNamingStrategy) Specify aPropertyNamingStrategyto configure theObjectMapperwith.Jackson2ObjectMapperBuilder.serializationInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include inclusion) Set a custom inclusion strategy for serialization.Jackson2ObjectMapperBuilder.serializationInclusion(com.fasterxml.jackson.annotation.JsonInclude.Value serializationInclusion) Set a custom inclusion strategy for serialization.Jackson2ObjectMapperBuilder.serializerByType(Class<?> type, JsonSerializer<?> serializer) Configure a custom serializer for the given type.Jackson2ObjectMapperBuilder.serializers(JsonSerializer<?>... serializers) Configure custom serializers.Jackson2ObjectMapperBuilder.serializersByType(Map<Class<?>, JsonSerializer<?>> serializers) Configure custom serializers for the given types.Jackson2ObjectMapperBuilder.simpleDateFormat(String format) Define the date/time format with aSimpleDateFormat.static Jackson2ObjectMapperBuilderJackson2ObjectMapperBuilder.smile()Obtain aJackson2ObjectMapperBuilderinstance in order to build a Smile data formatObjectMapperinstance.Override the defaultTimeZoneto use for formatting.Override the defaultTimeZoneto use for formatting.Jackson2ObjectMapperBuilder.visibility(com.fasterxml.jackson.annotation.PropertyAccessor accessor, com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility visibility) Specify visibility to limit what kind of properties are auto-detected.static Jackson2ObjectMapperBuilderJackson2ObjectMapperBuilder.xml()Obtain aJackson2ObjectMapperBuilderinstance in order to build anXmlMapperinstance.static Jackson2ObjectMapperBuilderJackson2ObjectMapperBuilder.yaml()Obtain aJackson2ObjectMapperBuilderinstance in order to build a YAML data formatObjectMapperinstance.