I am trying to map a Json string to a Java Object using ObjectMapper
ObjectMapper mapper = new ObjectMapper();
CustomerData customerData = mapper.readValue(customerDataString, customerData.class);
But when I do, I get this error
java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:530)
I looked online and checked for the incompatible dependencies in the pom.xml, and it appears to be the right version. So what am I missing?
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.0</version>
</dependency>