Class CreditsDeserializer

java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<Credits>
nl.vpro.domain.media.bind.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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CreditsDeserializer

      public CreditsDeserializer()
  • Method Details

    • 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