简体   繁体   中英

Jackson: Register fallback deserializer for unknown properties

Is there a way in Jackson to register a custom deserializer (using annotations or another way) for unknown properties? Something like a fallback deserializer, called instead of throwing UnrecognizedPropertyException .

NOTE: I do not want to ignore unknown properties, I want to collect them.

Seems like @JsonAnySetter annotation might help. See how-to guide here http://vincentdevillers.blogspot.co.il/2013/08/how-to-map-unknown-json-properties-with.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM