Reputation: 3550
I need to write a Json client in Android for Zenfolio API. I decided to use Spring ResTemplate with MappingHttpJacksonConverter. When i do POST with "exchange" method i recieve json response with one element named "@type" that causes deserializatoon exception. Is there an annotation that tells deserializer to omit that tag? How to turn on annotation for json deserializer?
Upvotes: 1
Views: 562
Reputation: 2584
Try @JsonIgnoreProperties(ignoreUnknown=true) on your mapping classes if you want to ignore all elements that you are not interested in.
Upvotes: 3
Reputation: 2948
Try using @JsonIgnore ("@type")
, Jackson annotations are enabled by default.
See http://wiki.fasterxml.com/JacksonAnnotations for more info.
Upvotes: 0