Java Code Examples for org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter

Following code examples demonstrate how to use org.springframework.http.converter.json.AbstractJackson2HttpMessageConverterfrom spring-framework. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.springframework.http.converter.json.AbstractJackson2HttpMessageConverterand various code implementation of this class.

    public HttpMessageConverter httpSmileJackson2MessageConverter() {
        return new AbstractJackson2HttpMessageConverter(
                new ObjectMapper(new SmileFactory()).registerModule(new AfterburnerModule()),
                new MediaType("application", "x-jackson-smile")) {
        };
    } 


Advertisement
Javadoc
Abstract base class for Jackson based and content type independent HttpMessageConverter implementati

ons.

Compatible with Jackson 2.9 and higher, as of Spring 5.0. @author Arjen Poutsma @author Keith Donald @author Rossen Stoyanchev @author Juergen Hoeller @author Sebastien Deleuze @since 4.1 @see MappingJackson2HttpMessageConverter

Read More
Advertisement