UnrecognizedPropertyException: Unrecognized field

http://stackoverflow.com/questions/4486787/jackson-with-json-unrecognized-field-not-marked-as-ignorable

@JsonIgnoreProperties
It will ignore every property you haven’t defined in your POJO. Very useful when you are just looking for a couple of properties in the JSON and don’t want to write the whole mapping. More info at Jackson’s website. If you want to ignore any non declared property, you should write:

@JsonIgnoreProperties(ignoreUnknown = true)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章