How to make sure Spring Boot extra Jackson modules are of same version?

Specify your dependencies explicitly and remove dependencies that you don't need as in:

<!-- Add typical dependencies for a web application -->
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <exclusions>
            <exclusion>
                <artifactId>jackson-databind</artifactId>
                <groupId>com.fasterxml.jackson.core</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20131018</version>
    </dependency>
</dependencies>

You can also change the version of built-in libs by overriding the properties. A list of properties can be found by looking at properties from effective POM using the command below. You can find the property which @Phil Web mentioned in the effective POM.

mvn help:effective-pom 

Spring Boot provides managed dependencies for the following Jackson modules:

  • jackson-annotations
  • jackson-core
  • jackson-databind
  • jackson-datatype-joda
  • jackson-datatype-jsr310

If you're using maven then additional modules could be defined in your own POM using the ${jackson.version} property. eg:

<dependency>
    <groupId>com.fasterxml.jackson.datatype</groupId>
    <artifactId>jackson-datatype-whatever</artifactId>
    <version>${jackson.version}</version>
</dependency>

In Gradle just add ext['jackson.version'] = 'specify version here' before dependencies section.