Class BuilderBasedDeserializer

    • Field Detail

      • _targetType

        protected final JavaType _targetType
        Type that the builder will produce, target type; as opposed to `handledType()` which refers to Builder class.
        Since:
        2.9
    • Method Detail

      • unwrappingDeserializer

        public JsonDeserializer<java.lang.Object> unwrappingDeserializer​(NameTransformer unwrapper)
        Description copied from class: JsonDeserializer
        Method that will return deserializer instance that is able to handle "unwrapped" value instances If no unwrapped instance can be constructed, will simply return this object as-is.

        Default implementation just returns 'this' indicating that no unwrapped variant exists

        Specified by:
        unwrappingDeserializer in class BeanDeserializerBase
      • supportsUpdate

        public java.lang.Boolean supportsUpdate​(DeserializationConfig config)
        Description copied from class: JsonDeserializer
        Introspection method that may be called to see whether deserializer supports update of an existing value (aka "merging") or not. Return value should either be Boolean.FALSE if update is not supported at all (immutable values); Boolean.TRUE if update should usually work (regular POJOs, for example), or null if this is either not known, or may sometimes work.

        Information gathered is typically used to either prevent merging update for property (either by skipping, if based on global defaults; or by exception during deserialization construction if explicit attempt made) if Boolean.FALSE returned, or inclusion if Boolean.TRUE is specified. If "unknown" case (null returned) behavior is to exclude property if global defaults used; or to allow if explicit per-type or property merging is defined.

        Default implementation returns null to allow explicit per-type or per-property attempts.

        Overrides:
        supportsUpdate in class BeanDeserializerBase
      • finishBuild

        protected java.lang.Object finishBuild​(DeserializationContext ctxt,
                                               java.lang.Object builder)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • deserialize

        public java.lang.Object deserialize​(com.fasterxml.jackson.core.JsonParser p,
                                            DeserializationContext ctxt)
                                     throws java.io.IOException
        Main deserialization method for bean-based objects (POJOs).
        Specified by:
        deserialize in class JsonDeserializer<java.lang.Object>
        Parameters:
        p - Parsed used for reading JSON content
        ctxt - Context that can be used to access information about this deserialization activity.
        Returns:
        Deserialized value
        Throws:
        java.io.IOException
      • deserialize

        public java.lang.Object deserialize​(com.fasterxml.jackson.core.JsonParser p,
                                            DeserializationContext ctxt,
                                            java.lang.Object value)
                                     throws java.io.IOException
        Secondary deserialization method, called in cases where POJO instance is created as part of deserialization, potentially after collecting some or all of the properties to set.
        Overrides:
        deserialize in class JsonDeserializer<java.lang.Object>
        Throws:
        java.io.IOException
      • deserializeFromObject

        public java.lang.Object deserializeFromObject​(com.fasterxml.jackson.core.JsonParser p,
                                                      DeserializationContext ctxt)
                                               throws java.io.IOException
        General version used when handling needs more advanced features.
        Specified by:
        deserializeFromObject in class BeanDeserializerBase
        Throws:
        java.io.IOException
      • _deserializeUsingPropertyBased

        protected java.lang.Object _deserializeUsingPropertyBased​(com.fasterxml.jackson.core.JsonParser p,
                                                                  DeserializationContext ctxt)
                                                           throws java.io.IOException
        Method called to deserialize bean using "property-based creator": this means that a non-default constructor or factory method is called, and then possibly other setters. The trick is that values for creator method need to be buffered, first; and due to non-guaranteed ordering possibly some other properties as well.
        Specified by:
        _deserializeUsingPropertyBased in class BeanDeserializerBase
        Returns:
        Builder instance constructed
        Throws:
        java.io.IOException
      • _deserialize

        protected final java.lang.Object _deserialize​(com.fasterxml.jackson.core.JsonParser p,
                                                      DeserializationContext ctxt,
                                                      java.lang.Object builder)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeWithView

        protected final java.lang.Object deserializeWithView​(com.fasterxml.jackson.core.JsonParser p,
                                                             DeserializationContext ctxt,
                                                             java.lang.Object bean,
                                                             java.lang.Class<?> activeView)
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeWithUnwrapped

        protected java.lang.Object deserializeWithUnwrapped​(com.fasterxml.jackson.core.JsonParser p,
                                                            DeserializationContext ctxt)
                                                     throws java.io.IOException
        Method called when there are declared "unwrapped" properties which need special handling
        Throws:
        java.io.IOException
      • deserializeUsingPropertyBasedWithUnwrapped

        protected java.lang.Object deserializeUsingPropertyBasedWithUnwrapped​(com.fasterxml.jackson.core.JsonParser p,
                                                                              DeserializationContext ctxt)
                                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeWithUnwrapped

        protected java.lang.Object deserializeWithUnwrapped​(com.fasterxml.jackson.core.JsonParser p,
                                                            DeserializationContext ctxt,
                                                            java.lang.Object builder,
                                                            TokenBuffer tokens)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeWithExternalTypeId

        protected java.lang.Object deserializeWithExternalTypeId​(com.fasterxml.jackson.core.JsonParser p,
                                                                 DeserializationContext ctxt)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeWithExternalTypeId

        protected java.lang.Object deserializeWithExternalTypeId​(com.fasterxml.jackson.core.JsonParser p,
                                                                 DeserializationContext ctxt,
                                                                 java.lang.Object bean)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeUsingPropertyBasedWithExternalTypeId

        protected java.lang.Object deserializeUsingPropertyBasedWithExternalTypeId​(com.fasterxml.jackson.core.JsonParser p,
                                                                                   DeserializationContext ctxt)
                                                                            throws java.io.IOException
        Throws:
        java.io.IOException