Class StdKeyDeserializer

  • All Implemented Interfaces:
    java.io.Serializable

    public class StdKeyDeserializer
    extends KeyDeserializer
    implements java.io.Serializable
    Default KeyDeserializer implementation used for most Map types Jackson supports. Implemented as "chameleon" (or swiss pocket knife) class; not particularly elegant, but helps reduce number of classes and jar size (class metadata adds significant per-class overhead; much more than bytecode).
    See Also:
    Serialized Form
    • Constructor Detail

      • StdKeyDeserializer

        protected StdKeyDeserializer​(int kind,
                                     java.lang.Class<?> cls)
      • StdKeyDeserializer

        protected StdKeyDeserializer​(int kind,
                                     java.lang.Class<?> cls,
                                     FromStringDeserializer<?> deser)
    • Method Detail

      • deserializeKey

        public java.lang.Object deserializeKey​(java.lang.String key,
                                               DeserializationContext ctxt)
                                        throws java.io.IOException
        Description copied from class: KeyDeserializer
        Method called to deserialize a Map key from JSON property name.
        Specified by:
        deserializeKey in class KeyDeserializer
        Throws:
        java.io.IOException
      • getKeyClass

        public java.lang.Class<?> getKeyClass()
      • _parse

        protected java.lang.Object _parse​(java.lang.String key,
                                          DeserializationContext ctxt)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • _parseInt

        protected int _parseInt​(java.lang.String key)
                         throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • _parseLong

        protected long _parseLong​(java.lang.String key)
                           throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • _parseDouble

        protected double _parseDouble​(java.lang.String key)
                               throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • _weirdKey

        protected java.lang.Object _weirdKey​(DeserializationContext ctxt,
                                             java.lang.String key,
                                             java.lang.Exception e)
                                      throws java.io.IOException
        Throws:
        java.io.IOException