Class PCollectionsMapDeserializer<T extends org.pcollections.PMap<Object,Object>>

java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<T>
com.fasterxml.jackson.datatype.pcollections.deser.PCollectionsMapDeserializer<T>
All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.ContextualDeserializer, com.fasterxml.jackson.databind.deser.NullValueProvider
Direct Known Subclasses:
HashTreePMapDeserializer

public abstract class PCollectionsMapDeserializer<T extends org.pcollections.PMap<Object,Object>> extends com.fasterxml.jackson.databind.JsonDeserializer<T> implements com.fasterxml.jackson.databind.deser.ContextualDeserializer
  • Nested Class Summary

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

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

    Fields
    Modifier and Type
    Field
    Description
    protected com.fasterxml.jackson.databind.KeyDeserializer
    Key deserializer used, if not null.
    protected final com.fasterxml.jackson.databind.type.MapType
     
    protected final com.fasterxml.jackson.databind.jsontype.TypeDeserializer
    If value instances have polymorphic type information, this is the type deserializer that can handle it
    protected com.fasterxml.jackson.databind.JsonDeserializer<?>
    Value deserializer.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    PCollectionsMapDeserializer(com.fasterxml.jackson.databind.type.MapType type, com.fasterxml.jackson.databind.KeyDeserializer keyDeser, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser, com.fasterxml.jackson.databind.JsonDeserializer<?> deser)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected T
    _deserializeEntries(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt)
     
    protected T
    _handleNull(com.fasterxml.jackson.databind.DeserializationContext ctxt, Object key, com.fasterxml.jackson.databind.JsonDeserializer<?> valueDeser, T map)
    Overridable helper method called when a JSON null value is encountered.
    com.fasterxml.jackson.databind.JsonDeserializer<?>
    createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty property)
    Method called to finalize setup of this deserializer, after deserializer itself has been registered.
    protected abstract T
     
    deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt)
     
    deserializeWithType(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer)
    Base implementation that does not assume specific type inclusion mechanism.
    com.fasterxml.jackson.databind.type.LogicalType
     
    withResolved(com.fasterxml.jackson.databind.KeyDeserializer keyDeser, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser, com.fasterxml.jackson.databind.JsonDeserializer<?> valueDeser)
    Overridable fluent factory method used for creating contextual instances.

    Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

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

    Methods inherited from class java.lang.Object

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

    • _mapType

      protected final com.fasterxml.jackson.databind.type.MapType _mapType
    • _keyDeserializer

      protected com.fasterxml.jackson.databind.KeyDeserializer _keyDeserializer
      Key deserializer used, if not null. If null, String from JSON content is used as is.
    • _valueDeserializer

      protected com.fasterxml.jackson.databind.JsonDeserializer<?> _valueDeserializer
      Value deserializer.
    • _typeDeserializerForValue

      protected final com.fasterxml.jackson.databind.jsontype.TypeDeserializer _typeDeserializerForValue
      If value instances have polymorphic type information, this is the type deserializer that can handle it
  • Constructor Details

    • PCollectionsMapDeserializer

      protected PCollectionsMapDeserializer(com.fasterxml.jackson.databind.type.MapType type, com.fasterxml.jackson.databind.KeyDeserializer keyDeser, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser, com.fasterxml.jackson.databind.JsonDeserializer<?> deser)
  • Method Details

    • logicalType

      public com.fasterxml.jackson.databind.type.LogicalType logicalType()
      Overrides:
      logicalType in class com.fasterxml.jackson.databind.JsonDeserializer<T extends org.pcollections.PMap<Object,Object>>
    • withResolved

      public abstract PCollectionsMapDeserializer<T> withResolved(com.fasterxml.jackson.databind.KeyDeserializer keyDeser, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser, com.fasterxml.jackson.databind.JsonDeserializer<?> valueDeser)
      Overridable fluent factory method used for creating contextual instances.
    • createContextual

      public com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException
      Method called to finalize setup of this deserializer, after deserializer itself has been registered. This is needed to handle recursive and transitive dependencies.
      Specified by:
      createContextual in interface com.fasterxml.jackson.databind.deser.ContextualDeserializer
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException
    • deserializeWithType

      public Object deserializeWithType(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) throws IOException
      Base implementation that does not assume specific type inclusion mechanism. Sub-classes are expected to override this method if they are to handle type information.
      Overrides:
      deserializeWithType in class com.fasterxml.jackson.databind.JsonDeserializer<T extends org.pcollections.PMap<Object,Object>>
      Throws:
      IOException
    • deserialize

      public T deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException
      Specified by:
      deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<T extends org.pcollections.PMap<Object,Object>>
      Throws:
      IOException
    • createEmptyMap

      protected abstract T createEmptyMap()
    • _deserializeEntries

      protected T _deserializeEntries(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException
      Throws:
      IOException
    • _handleNull

      protected T _handleNull(com.fasterxml.jackson.databind.DeserializationContext ctxt, Object key, com.fasterxml.jackson.databind.JsonDeserializer<?> valueDeser, T map) throws IOException
      Overridable helper method called when a JSON null value is encountered. Since PCollections Maps typically do not allow null values, special handling is needed; default is to simply ignore and skip such values, but alternative could be to throw an exception.
      Throws:
      IOException