Class BuilderBasedDeserializer

    • 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
      • deserialize

        public java.lang.Object deserialize​(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​(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