I am binding a JSON response to my class using Jackson. Everything works great except when there are more fields in my JSON response than my class defines. I want Jackson to ignore the fields that do not exist in my JSON response. This is due to compatability for future versions. If I add a new field I do not want previous versions of my client to crash.
ObjectMapper mapper = new ObjectMapper(); // can reuse, share globally
PromoResponse promoResponse = mapper.readValue(r, PromoResponse.class);
以上就是Java Jackson org.codehaus.jackson.map.exc.UnrecognizedPropertyException的详细内容，更多请关注web前端其它相关文章！