Jackson Data Binding Source Code

Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java".

  • Jackson Data Binding module allows you to converts JSON to and from POJO (Plain Old Java Object) using property accessor or using annotations.
  • Jackson Databind Source Code files are provided in the source packge (jackson-databind-2.12.4-sources.jar). You can download it at Jackson Maven Website.

    You can also browse Jackson Databind Source Code below:

    ✍: FYIcenter.com

    com/fasterxml/jackson/databind/type/TypeModifier.java

    package com.fasterxml.jackson.databind.type;
    
    import java.lang.reflect.Type;
    
    import com.fasterxml.jackson.databind.JavaType;
    
    /**
     * Class that defines API that can be used to modify details of
     * {@link JavaType} instances constructed using {@link TypeFactory}.
     * Registered modifiers are called in order, to let them modify (or
     * replace) basic type instance factory constructs.
     * This is typically needed to support creation of
     * {@link MapLikeType} and {@link CollectionLikeType} instances,
     * as those cannot be constructed in generic fashion.
     */
    public abstract class TypeModifier
    {
        /**
         * Method called to let modifier change constructed type definition.
         * Note that this is only guaranteed to be called for
         * non-container types ("simple" types not recognized as arrays,
         * <code>java.util.Collection</code> or <code>java.util.Map</code>).
         * 
         * @param type Instance to modify
         * @param jdkType JDK type that was used to construct instance to modify
         * @param context Type resolution context used for the type
         * @param typeFactory Type factory that can be used to construct parameter type; note,
         *   however, that care must be taken to avoid infinite loops -- specifically, do not
         *   construct instance of primary type itself
         * 
         * @return Actual type instance to use; usually either <code>type</code> (as is or with
         *    modifications), or a newly constructed type instance based on it. Cannot be null.
         */
        public abstract JavaType modifyType(JavaType type, Type jdkType, TypeBindings context,
                TypeFactory typeFactory);
    }
    

    com/fasterxml/jackson/databind/type/TypeModifier.java

     

    ⇒ Jackson Annotations Source Code

    ⇐ Download and Install Jackson Binary Package

    ⇑ Downloading and Reviewing jackson-*.jar

    ⇑⇑ Jackson - Java JSON library

    2022-03-29, 31944👍, 0💬