Class JsonNodeDeserializer

    • Field Detail

      • instance

        private static final JsonNodeDeserializer instance
        Singleton instance of generic deserializer for JsonNode. Only used for types other than JSON Object and Array.
    • Constructor Detail

      • JsonNodeDeserializer

        protected JsonNodeDeserializer()
      • JsonNodeDeserializer

        protected JsonNodeDeserializer​(JsonNodeDeserializer base,
                                       boolean mergeArrays,
                                       boolean mergeObjects)
    • Method Detail

      • getDeserializer

        public static JsonDeserializer<? extends JsonNode> getDeserializer​(java.lang.Class<?> nodeClass)
        Factory method for accessing deserializer for specific node type
      • deserialize

        public JsonNode deserialize​(com.fasterxml.jackson.core.JsonParser p,
                                    DeserializationContext ctxt)
                             throws java.io.IOException
        Implementation that will produce types of any JSON nodes; not just one deserializer is registered to handle (in case of more specialized handler). Overridden by typed sub-classes for more thorough checking
        Specified by:
        deserialize in class JsonDeserializer<JsonNode>
        Parameters:
        p - Parser 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
      • 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 deserializer 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 BaseNodeDeserializer<JsonNode>