Class EvolvableHandler

  • All Implemented Interfaces:
    UnknownPropertyHandler

    public class EvolvableHandler
    extends Object
    implements UnknownPropertyHandler
    An implementation of an UnknownPropertyHandler that supports evolution of data classes via Evolvable interface.

    If the target object we are deserializing into is Evolvable, this handler will add any unknown properties encountered during deserialization into Evolvable.unknownProperties() map, and will write them out along with all known properties during subsequent serialization.

    This prevents data loss when serializing and deserializing the same JSON payload using different versions of Java data classes.

    Author:
    Aleks Seovic 2018.05.20