Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jackson 2.0 with Spring 3.1

Is Spring MVC 3.1 compatible with Jackson 2.0? Will Spring MVC's automatic detection of Jackson on the classpath, and delegation to Jackson for requests with a JSON content-type still work?

like image 999
EngineerBetter_DJ Avatar asked May 02 '12 19:05

EngineerBetter_DJ


People also ask

What version of Jackson does spring boot use?

As you can see above, the Spring Boot parent POM uses an older version of Jackson (2.6. 5).

Does spring include Jackson?

Spring Boot and JacksonThe Spring Boot parent POM includes Jackson dependencies.

Is Jackson inbuilt in spring boot?

Spring Framework and Spring Boot provide builtin support for Jackson based XML serialization/deserialization. As soon as you include the jackson-dataformat-xml dependency to your project, it is automatically used instead of JAXB2.

Is Jackson a JSON?

Jackson is one of the most popular Java JSON libraries, and is the one I use most frequently. In this post I'll pick a fairly complex JSON document and three queries which I want to make using Jackson. I'll compare three different approaches: Tree model.


2 Answers

Keith Donald (of spring source) tweeted the following a while back.

Spring MVC support for Jackson 2; also works with Jackson's native "pretty print" feature https://gist.github.com/2423129

I haven't tried the MappingJackson2HttpMessageConverter found in the gist above but it would surprise me if it did not work.

like image 195
Fredrik Avatar answered Sep 20 '22 17:09

Fredrik


Support for Jackson 2 has been added in Spring 3.2, and has also backported to Spring 3.1.2 (SPR-9507)

like image 33
Aleksander Blomskøld Avatar answered Sep 21 '22 17:09

Aleksander Blomskøld