JsonIgnoreProperties not working

Try using the last Jackson version (2.4):

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
@JsonIgnoreProperties({"id"})

Here you can find an example where it's implement using version 2.4: http://www.ibm.com/developerworks/java/library/j-hangman-app/index.html


You've mixed different versions of Jackson. Notice that you import JsonIgnoreProperties from org.codehaus.jackson.annotate (version 1.x) while you're using ObjectMapper from com.fasterxml.jackson.databind (version 2.x).

Tags:

Jackson