Suppose I am having POJO which contains 10 fields and getter/setter for each one. I wou开发者_开发百科ld like to get the selected fields from that POJO during serialization and deserialization depending on some conditions. Can i achieve this using Jackson?? If so then can some on help me out and give some idea?
For serialization, you could read "Filtering properties with Jackson" for some possibilities.
As to deserialization, one possibility would be to first bind to a Map or JsonNode, then pick properties from there -- filtering options do not work deserialization.
精彩评论