日期:2014-05-16  浏览次数:20380 次

Jackson json annotation 试探

简单的使用了jackson的annotation,

@JsonAutoDetect (class)

这是作用于类的annotation,主要用于指明该类使用annotation,并且可以自动侦测getter,setter,构造方法,以便生成json对象

@JsonIgnore (method/field):作用于方法或字段,用来表明,当生成json的时候忽略有该annotation的方法或字段

?

更多可以参考:http://wiki.fasterxml.com/JacksonAnnotations