Class CreditsDeserializer

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.deser.NullValueProvider

    public class CreditsDeserializer
    extends com.fasterxml.jackson.databind.JsonDeserializer<Credits>
    Resolves polymorphism of credits. Make sure to unmarshal as a Person if that is appropriate, and to Name otherwise. Using JsonTypeId would have been possible too, but that would make the 'objectType' required, and we have to republish everything. There is not real reason, it is simple to recognize by other fields wether we want a Person or not. This class is added as a JsonDeserializer only on Credits, and to avoid infinite recursion, in all extensions this is overridden by the default again. We do however include Credits.getObjectType() for the serializer, so other implementors (perhaps we in the future) may choose to switch on that after all.
    Since:
    5.12
    Author:
    Michiel Meeuwissen
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        com.fasterxml.jackson.databind.JsonDeserializer.None
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Credits deserialize​(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt)  
      • Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer
    • Constructor Detail

      • CreditsDeserializer

        public CreditsDeserializer()
    • Method Detail

      • deserialize

        public Credits deserialize​(com.fasterxml.jackson.core.JsonParser jp,
                                   com.fasterxml.jackson.databind.DeserializationContext ctxt)
                            throws IOException
        Specified by:
        deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<Credits>
        Throws:
        IOException