JsonIgnoreProperties not working

后端 未结 4 1757
故里飘歌
故里飘歌 2021-01-07 17:54

I have the following simple class:

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
@JsonIgnoreProperties({ \"thirdField\" })
public class Message          


        
4条回答
  •  遥遥无期
    2021-01-07 18:42

    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

提交回复
热议问题