javajacksonjackson-databind

Upgrade of Jackson from org.codehaus.jackson to com.fasterxml.jackson (version 1.9.13 --> 2.9.8)


In our code we have org.codehaus.jackson imports in java file. now we are moving to com.fasterxml.jackson.

What are the points are to be considered for smooth up gradation?


Solution

  • Following are some of the changes identified between Jackson 1.9.x and Jackson 2.9.8

    1. org.codehaus.jackson changed to com.fasterxml.jackson
    2. org.codehaus.jackson.map changed to com.fasterxml.jackson.databind
    3. SerializationConfig.Feature changed and split to SerializationFeature,MapperFeature
    4. DeSerializationConfig.Feature changed and split to DeSerializationFeature,MapperFeature
    5. AnnotationIntrospector.Pair changed to AnnotationIntrospectorPair
    6. SerializationConfig.withAnnotationIntrospectro(...) changed to SerializationConfig.with(...)
    7. ObjectMapper.getSerilizationConfig().addMixInAnnotations(...) changed to ObjectMapper.addMixIn(....)
    8. JSonSerialize.include changed to JSonInclude
    9. ObjectMapper.readValue(JSonNode,...) changed to ObjectMapper.readValue(ObjectMapper.treeAsTokens(JSonNode),...)