Jersey JSONConfiguration FEATURE_POJO_映射-如何在反序列化过程中跳过不需要的条目

Jersey JSONConfiguration FEATURE_POJO_映射-如何在反序列化过程中跳过不需要的条目,jersey,Jersey,我正在为facebook对象定义POJO,没有解析JSON能力的客户端可以使用它。FB对象的一些数据结构是松散定义的,比如work "work":[ {"employer":{"id":"xxxxxxxxx","name":"ABC"}, "location":{"id":"xxxxxxxxx","name":"Philadelphia, Pennsylvania"} "position":{"id":"198376496853401","name":"Manager"} "with":[

我正在为facebook对象定义POJO,没有解析JSON能力的客户端可以使用它。FB对象的一些数据结构是松散定义的,比如work

"work":[
{"employer":{"id":"xxxxxxxxx","name":"ABC"},
 "location":{"id":"xxxxxxxxx","name":"Philadelphia, Pennsylvania"}
 "position":{"id":"198376496853401","name":"Manager"}
 "with":[{"id":"xxxxxxxxxxxx","name":"Dogbert Smith"}]}
   ]
我的问题是如何在反序列化时跳过这些对象。我正在使用

ClientConfig=newdefaultclientconfig(); config.getFeatures().put(JSONConfiguration.FEATURE\u POJO\u映射,Boolean.TRUE)

有没有办法自定义要反序列化的内容


谢谢你的指点。

我找到了解决方案。在pojo中添加了
@JsonIgnoreProperties
,我需要忽略其中的一些属性。效果很好。

我找到了解决方案。将@JsonIgnoreProperties添加到pojo中,我需要忽略其中的一些属性。效果很好。