org.codehaus.jackson.xc.JaxbAnnotationIntrospector Java Examples
The following examples show how to use
org.codehaus.jackson.xc.JaxbAnnotationIntrospector.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ObjectMapperResolver.java From localization_nifi with Apache License 2.0 | 5 votes |
public ObjectMapperResolver() throws Exception { mapper = new ObjectMapper(); final AnnotationIntrospector jaxbIntrospector = new JaxbAnnotationIntrospector(); final SerializationConfig serializationConfig = mapper.getSerializationConfig(); final DeserializationConfig deserializationConfig = mapper.getDeserializationConfig(); mapper.setSerializationConfig(serializationConfig.withSerializationInclusion(Inclusion.NON_NULL).withAnnotationIntrospector(jaxbIntrospector)); mapper.setDeserializationConfig(deserializationConfig.withAnnotationIntrospector(jaxbIntrospector)); }
Example #2
Source File: ObjectMapperResolver.java From localization_nifi with Apache License 2.0 | 5 votes |
public ObjectMapperResolver() throws Exception { mapper = new ObjectMapper(); final AnnotationIntrospector jaxbIntrospector = new JaxbAnnotationIntrospector(); final SerializationConfig serializationConfig = mapper.getSerializationConfig(); final DeserializationConfig deserializationConfig = mapper.getDeserializationConfig(); mapper.setSerializationConfig(serializationConfig.withSerializationInclusion(Inclusion.NON_NULL).withAnnotationIntrospector(jaxbIntrospector)); mapper.setDeserializationConfig(deserializationConfig.withAnnotationIntrospector(jaxbIntrospector)); }
Example #3
Source File: ObjectMapperResolver.java From localization_nifi with Apache License 2.0 | 5 votes |
public ObjectMapperResolver() throws Exception { mapper = new ObjectMapper(); final AnnotationIntrospector jaxbIntrospector = new JaxbAnnotationIntrospector(); final SerializationConfig serializationConfig = mapper.getSerializationConfig(); final DeserializationConfig deserializationConfig = mapper.getDeserializationConfig(); mapper.setSerializationConfig(serializationConfig.withSerializationInclusion(Inclusion.NON_NULL).withAnnotationIntrospector(jaxbIntrospector)); mapper.setDeserializationConfig(deserializationConfig.withAnnotationIntrospector(jaxbIntrospector)); }
Example #4
Source File: YarnJacksonJaxbJsonProvider.java From hadoop with Apache License 2.0 | 4 votes |
public static void configObjectMapper(ObjectMapper mapper) { AnnotationIntrospector introspector = new JaxbAnnotationIntrospector(); mapper.setAnnotationIntrospector(introspector); mapper.setSerializationInclusion(Inclusion.NON_NULL); }
Example #5
Source File: YarnJacksonJaxbJsonProvider.java From big-c with Apache License 2.0 | 4 votes |
public static void configObjectMapper(ObjectMapper mapper) { AnnotationIntrospector introspector = new JaxbAnnotationIntrospector(); mapper.setAnnotationIntrospector(introspector); mapper.setSerializationInclusion(Inclusion.NON_NULL); }
Example #6
Source File: JacksonProvider.java From scheduling with GNU Affero General Public License v3.0 | 4 votes |
public JacksonProvider() { AnnotationIntrospector introspector = new JaxbAnnotationIntrospector(); AnnotationIntrospector secondary = new JacksonAnnotationIntrospector(); mapper.setAnnotationIntrospector(new AnnotationIntrospector.Pair(introspector, secondary)); mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false); }