Object Hierarchy
JsonTypeInfo
Used to handle inheritance and polymorphic classes.
Now the ExtendedEmployee can be serialized and deserialized using Employee as a reference. Jackson will know the actual type of Employee to use.
JsonSubTypes
Used along JsonTypeInfo to indicate the inheritance hierarchy.
Last updated
Was this helpful?