jackson-databind
CLAUDE.md3.8k starsChanged 3 years agoApache-2.0View on GitHub
This is jackson-databind, the general-purpose data-binding functionality and tree-model for Jackson Data Processor. It builds on the Streaming API (jackson-core) and uses jackson-annotations for configuration. This is the 3.x branch (Jackson 3.0+) which requires JDK 17+ and uses the tools.jackson package namespace (2.x used com.fasterxml.jackson). Key characteristics: - ~790 test files with comprehensive test coverage - Thread-safe mapper instances (as of Jackson 3.0) - Maven-based build system with Maven wrapper (./mvnw) - Supports multiple JDK versions (17, 21, 25) with…
Trending
More talk lately.about the whole repository
Who's talking about FasterXML/jackson-databind
- Stack Overflow“Convert JSON to Map”Stack Overflow · Feb 24, 2009 · 457 votes
- Stack Overflow“Serializing enums with Jackson”Stack Overflow · Jan 8, 2013 · 85 votes
- Stack Overflow“Ignoring property when deserializing”Stack Overflow · Sep 16, 2016 · 84 votes
- Stack Overflow“Deserializing polymorphic types with Jackson based on the presence of a unique property”Stack Overflow · Apr 25, 2018 · 62 votes
- Stack Overflow“Parse to a Subclass by default with Jackson”Stack Overflow · Dec 17, 2014 · 50 votes
The biggest 5 of 83 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 83
Talked about on GitHub, Stack Overflow and Hacker News (83 times).
On GitHub · 50
- Oct 28, 2025Jackson 3.0 support — OpenAPITools/jackson-databind-nullable26 reactions · 8 comments
- Nov 9, 2024Missing empty constructor issue: deserialization breaking change from 2.17 to 2.18 — FasterXML/jackson-module-kotlin15 reactions · 24 comments
- Sep 10, 2023Extend GitHub's CNA scope — github/advisory-database9 reactions · 8 comments
- Mar 25, 2020[BUG] [Java] uppercase property leads to duplicate fields after serialization — OpenAPITools/openapi-generator9 reactions · 2 comments
- Mar 18, 2024Cannot use value class as map key in 2.17 — FasterXML/jackson-module-kotlin7 reactions · 11 comments
45 more on GitHub
- Dec 9, 2023[BUG] [JAVA] combining properties and additionalProperties generates broken Model class — OpenAPITools/openapi-generator7 reactions · 8 comments
- Jul 29, 2017Make @JsonSubTypes optional — FasterXML/jackson-future-ideas7 reactions
- Nov 22, 2017Incompatibility with Jackson 2.9.x — twitter/finatra6 reactions · 6 comments
- Sep 9, 2025deprecated usage of com.fasterxml.jackson.databind.PropertyNamingStrategies — gitlab4j/gitlab4j-api5 reactions · 13 comments
- Jun 19, 2023[FP]: CVE-2023-35116 — dependency-check/DependencyCheck5 reactions · 14 comments
- Mar 13, 2020Jackson JsonIgnore does not work in Kotlin — FasterXML/jackson-module-kotlin5 reactions · 5 comments
- Aug 7, 2019Cannot override jackson.version using Gradle Dependency Management Plugin — spring-projects/spring-boot5 reactions · 2 comments
- Jan 30, 2016Create `jackson-datatype-jdbc`? — FasterXML/jackson-future-ideas5 reactions · 3 comments
- May 8, 2018Add support for Java-tuples datatypes (as part of `jackson-datatypes-collections`?) — FasterXML/jackson-future-ideas4 reactions
- Mar 16, 2017Feature dmf integration tests — eclipse-hawkbit/hawkbit4 reactions · 2 comments
- Sep 5, 2025Add `JsonInclude.Value` convenience constants — FasterXML/jackson-annotations2 reactions · 2 comments
- Feb 9, 2023Create reproducible artifacts — google/guava2 reactions · 2 comments
- Feb 23, 2020Upgrade to Jackson 2.9.10.20200223 to address CVE-2020-8840 — dropwizard/dropwizard2 reactions · 2 comments
- Nov 2, 2026build: bump com.fasterxml.jackson.core:jackson-databind in / — openai/openai-java1 reaction · 1 comment
- Oct 26, 2026build(deps): bump the maven-minor-and-patch group across 1 directory with 11 updates — Mika3578/habitv1 reaction · 2 comments
- Oct 26, 2026chore(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.18.9 to 2.22.4 — Abhiramrathod/mcp-server-testing1 reaction · 3 comments
- Oct 26, 2026chore(deps-dev): bump jackson.version from 2.22.3 to 2.22.4 — redis/jedis1 reaction · 1 comment
- Oct 25, 2026build(deps): Bump jackson.version from 2.22.3 to 2.22.4 — unknowIfGuestInDream/javafxTool1 reaction · 11 comments
- Oct 22, 2026Bump com.fasterxml.jackson.core:jackson-databind from 2.22.3 to 2.22.4 — ikasanEIP/IkasanStudio1 reaction · 2 comments
- Oct 21, 2026build(deps): Bump com.fasterxml.jackson.core:jackson-databind from 2.22.2 to 2.22.4 — redhat-developer/devspaces-gateway-plugin1 reaction · 4 comments
- Oct 21, 2026build(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.22.3 to 2.22.4 — liliancavalet/json-plus-yaml1 reaction · 2 comments
- Oct 20, 2026Bump tools.jackson.core:jackson-databind from 3.2.2 to 3.2.3 in /matrix-sdk-examples — hikingc/JavaMatrixLibrary1 reaction · 1 comment
- Oct 16, 2026Bump com.fasterxml.jackson.core:jackson-databind from 2.18.2 to 2.18.11 — actively-ai/tough-client-java1 reaction
- Oct 16, 2026build(deps): Bump com.fasterxml.jackson.core:jackson-databind from 2.22.2 to 2.22.3 — redhat-developer/devspaces-gateway-plugin1 reaction · 4 comments
- Oct 14, 2026fix(android): align instrumentation Jackson with the app runtime — shenyankm/PractiQ1 reaction · 1 comment
- Oct 13, 2026Bump com.fasterxml.jackson.core:jackson-databind from 2.21.1 to 2.21.7 — Universite-Gustave-Eiffel/NoiseModelling1 reaction · 1 comment
- Oct 8, 2026Bump tools.jackson.core:jackson-databind from 3.2.2 to 3.2.3 in /matrix-sdk-core — hikingc/JavaMatrixLibrary1 reaction · 1 comment
- Oct 5, 2026Bump com.fasterxml.jackson.core:jackson-databind from 2.22.2 to 2.22.3 in the maven group across 1 directory — naranor/jackson-datatype-jts1 reaction
- Oct 5, 2026Bump tools.jackson.core:jackson-databind from 3.2.2 to 3.2.3 — hikingc/JavaMatrixLibrary1 reaction · 1 comment
- Oct 4, 2026Bump com.fasterxml.jackson.core:jackson-databind from 2.22.1 to 2.22.3 — BarrySW19/CalculonX1 reaction · 1 comment
- Oct 3, 2026chore(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.19.2 to 2.21.7 in /sdks/java — afonsoft/KnowledgeRAG1 reaction · 1 comment
- Oct 2, 2026Bump com.fasterxml.jackson.core:jackson-databind from 2.17.1 to 2.18.11 — britoeabreu/Battleship21 reaction · 1 comment
- Oct 1, 2026fix(deps): update dependency tools.jackson.core:jackson-databind to v3.1.7 [security] — GoogleCloudPlatform/spring-cloud-gcp1 reaction
- Oct 1, 2026build(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.22.1 to 2.22.3 — openai/openai-java1 reaction · 3 comments
- Oct 1, 2026chore(deps): bump the java-dependencies group in /cloud-run-functions/java with 2 updates — DataDog/serverless-gcp-sample-apps1 reaction
- Sep 29, 2026Bump com.fasterxml.jackson.core:jackson-databind from 2.13.5 to 2.18.10 in /spark-doris-connector — terminal-api/doris-spark-connector1 reaction · 1 comment
- Sep 29, 2026Bump the maven group across 3 directories with 11 updates — a5huto5h/shopizer1 reaction
- Sep 29, 2026Bump com.fasterxml.jackson.core:jackson-databind from 2.15.4 to 2.18.10 — ORCID/ORCID-Source1 reaction · 1 comment
- Sep 28, 2026Bump com.fasterxml.jackson.core:jackson-databind from 2.14.2 to 2.18.10 in /spark-load — terminal-api/doris-spark-connector1 reaction · 1 comment
- Sep 28, 2026build(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.22.1 to 2.22.2 — openai/openai-java1 reaction · 3 comments
- Sep 28, 2026Bump com.fasterxml.jackson.core:jackson-databind from 2.22.1 to 2.22.2 — BarrySW19/CalculonX1 reaction · 2 comments
- Sep 28, 2026Bump com.fasterxml.jackson.core:jackson-databind from 2.22.1 to 2.22.2 in the maven group across 1 directory — naranor/jackson-datatype-jts1 reaction
- Sep 28, 2026build(deps): bump the maven-minor-and-patch group with 2 updates — Mika3578/habitv1 reaction · 2 comments
- Sep 28, 2026chore(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.18.9 to 2.22.3 — Abhiramrathod/mcp-server-testing1 reaction · 4 comments
- Sep 25, 2026build(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.22.2 to 2.22.3 — liliancavalet/json-plus-yaml1 reaction · 1 comment
On Stack Overflow · 30
- Feb 24, 2009Convert JSON to Map457 votes
- Jan 8, 2013Serializing enums with Jackson85 votes
- Sep 16, 2016Ignoring property when deserializing84 votes
- Apr 25, 2018Deserializing polymorphic types with Jackson based on the presence of a unique property62 votes
- Dec 17, 2014Parse to a Subclass by default with Jackson50 votes
25 more on Stack Overflow
- Aug 20, 2021In Java 17 how do I avoid resorting to --add-opens?46 votes · 2 answers
- Jul 22, 2015Forcing Jackson to deserialize to specific primitive type46 votes
- Jul 2, 2014Jackson enum Serializing and DeSerializer45 votes
- Jul 26, 2012Jackson json deserialization, ignore root element from json40 votes
- Aug 19, 2021how to resolve Joda date/time type `org.joda.time.DateTime` not supported by default37 votes
- Sep 27, 2013Deserializing into a HashMap of custom objects with jackson34 votes
- May 4, 2017Jackson: Serialize and deserialize enum values as integers30 votes
- Jul 2, 2014Serializing enums with Jackson26 votes
- Jul 20, 2018Jackson - Serialize boolean to 1/0 instead of true/false20 votes
- Dec 6, 2016Ignoring new fields on JSON objects using Jackson20 votes
- Dec 7, 2022Alternatives for PropertyNamingStrategy.SNAKE_CASE or PropertyNamingStrategy.SnakeCaseStrategy as it is deprecated now19 votes · 3 answers
- Aug 27, 2018What's the Jackson deserialization equivalent of @JsonUnwrapped?19 votes
- Jul 20, 2016Prevent float to int conversion when deserializing with Jackson18 votes
- Dec 20, 2014Jackson prefers private constructor over @JsonCreator when deserializing a class with @JsonValue17 votes
- Feb 21, 2018Jackson - Serialize / Deserialize Enums with Integer fields11 votes
- Jun 14, 2016@JsonProperty(access = JsonProperty.Access.WRITE_ONLY) not working10 votes
- Feb 7, 2012How do you make a deep copy of an object?10 votes
- Jan 18, 2019Prevent automatic String to Integer conversion in Jackson8 votes
- Aug 20, 2018Stop accepting ordinal values of enum in json parsing using jackson8 votes
- Jan 28, 2014Jackson: JsonTypeInfo does not add property8 votes
- Jul 24, 2017ISO8601 with milliseconds in json using Jackson7 votes · 1 answer
- Jan 19, 2021Spring batch 2.4.1 + Wildfly 20 final - java.lang.NoSuchFieldError: BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES6 votes
- Nov 15, 2020Kotlin and Jackson - Missing type id when trying to resolve subtype of simple type6 votes
- Mar 15, 2020How to define 2-level inheritance structure with Jackson6 votes
- Oct 24, 2016Force spring boot jackson deserializer to use BigDecimal6 votes
On Hacker News · 3
- Jun 28, 2023Disputed Jackson-databind CVE Causing Disruption4 points · 2 comments
- Mar 7, 2020Block two more gadget types (ibatis-sqlmap anteros-C CVE-2020-9547 CVE-2020-95481 point
- Jul 21, 2019Jackson-bind Block yet another gadget type (CVE-2019-12814)1 point · 1 comment
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
14 rules. About 0 are common, 9 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 163
Use DatabindTestUtil class (in testutil/ package) which extends JacksonTestUtilBase:
- Distinctive: line 172
If the test throws an exception (the expected behavior for an unfixed bug), the test passes.
- Very specific: line 173
If the test passes without error (meaning the bug was fixed), the test fails with a JacksonTestShouldFailException — signaling that the …
- Distinctive: line 184
Prefer text blocks (""" separator) over other mechanisms (like "a2q" or backslash escaping)
- Distinctive: line 185
Avoid "test" prefix in methods (legacy code has these)
- Very specific: line 253
Check if contextual configuration is needed (override createContextual(), defined directly on ValueSerializer/ValueDeserializer in 3.x -- …
- Distinctive: line 254
Consider caching implications - deserializers are heavily cached
- Very specific: line 259
Add feature flag to appropriate enum (MapperFeature, SerializationFeature, DeserializationFeature)
- Distinctive: line 260
Update configuration classes to handle the feature
- Distinctive: line 261
Add comprehensive tests in appropriate test package
- Distinctive: line 262
Consider backward compatibility with 2.x if relevant
- Distinctive: line 268
Ensure fix doesn't break existing tests
- Very specific: line 274
Type Handling: Use TypeFactory for creating JavaType instances with generics
- Distinctive: line 275
Builder Pattern: Always use builder for ObjectMapper construction in 3.x
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Behavioral
- Don’t assume. Don’t hide confusion. Surface tradeoffs.
- Minimum code that solves the problem. Limit speculative additions.
- Touch only what you must, clean up only your own mess -- but do suggest additional related fixes.
- Define success criteria. Loop until verified.
Project Overview
This is jackson-databind, the general-purpose data-binding functionality and tree-model for Jackson Data Processor. It builds on the Streaming API (jackson-core) and uses jackson-annotations for configuration. This is the 3.x branch (Jackson 3.0+) which requires JDK 17+ and uses the tools.jackson package namespace (2.x used com.fasterxml.jackson).
Key characteristics:
- ~790 test files with comprehensive test coverage
- Thread-safe mapper instances (as of Jackson 3.0)
- Maven-based build system with Maven wrapper (
./mvnw) - Supports multiple JDK versions (17, 21, 25) with special test profiles
Common Development Commands
Building and Testing
# Full build with tests
./mvnw clean verify
# Build without tests (faster)
./mvnw clean install -DskipTests
# Run tests only
./mvnw test
# Run a specific test class
./mvnw test -Dtest=ClassName
# Run a specific test method
./mvnw test -Dtest=ClassName#methodName
# Generate test report
./create-test-report.sh # runs: mvn surefire-report:report
# Verify Android SDK compatibility
./mvnw animal-sniffer:check
# JDK 21+ test sources: the `java21` profile auto-activates on JDK 21+,
# so no flag is normally needed (`-Pjava21` just forces it on)Code Quality
# Run with ErrorProne static analysis
./mvnw verify -Perrorprone
# Generate code coverage report
./mvnw test jacoco:report
# Report will be in target/site/jacoco/
# Check dependencies
./mvnw dependency:treeCode Architecture
Core Components Hierarchy
- ObjectMapper (
ObjectMapper.java): The main entry point for all Jackson databind operations- Thread-safe and fully immutable (as of 3.0)
- Uses builder pattern for construction (
JsonMapper.builder()for JSON) - Contains caches for serializers/deserializers
- Serialization Path (
ser/package):SerializerFactory/BeanSerializerFactory: Creates serializersValueSerializer: Base class for all serializersBeanSerializer: Handles POJO serializationBeanPropertyWriter: Writes individual bean propertiesSerializationContext: Context for serialization process
- Deserialization Path (
deser/package):DeserializerFactory/BeanDeserializerFactory: Creates deserializersValueDeserializer: Base class for all deserializersBeanDeserializer(indeser/bean/) /BeanDeserializerBuilder: Handles POJO deserializationSettableBeanProperty: Represents a settable bean propertyDeserializationContext: Context for deserialization process
- Type System (
type/package):JavaType(in rootdatabindpackage): Represents Java types with full generic informationTypeFactory: Creates JavaType instances- Critical for handling generics correctly
- Introspection (
introspect/package):AnnotatedClass,AnnotatedMethod,AnnotatedField: Represents annotated membersAnnotationIntrospector(in rootdatabindpackage): Processes annotations to configure behavior- Handles reflection and metadata extraction
- Configuration:
MapperConfig(incfg/): Base configurationSerializationConfig/DeserializationConfig(in rootdatabindpackage): Specific configurationsMapperFeature,SerializationFeature,DeserializationFeature(in rootdatabindpackage): Feature flagsPackageVersion(incfg/): Generated file containing version information
- Tree Model:
JsonNode(in rootdatabindpackage): Abstract base for all node typesObjectNode,ArrayNode,StringNode, etc. (innode/package): Concrete node types. Note: 2.x'sTextNodeis namedStringNodein 3.x- Alternative to POJO binding for dynamic structures
Package Organization
tools.jackson.databind- Core classes (ObjectMapper, configs, features)tools.jackson.databind.ser- Serialization infrastructuretools.jackson.databind.deser- Deserialization infrastructuretools.jackson.databind.type- Type system and TypeFactorytools.jackson.databind.introspect- Reflection and metadatatools.jackson.databind.node- Tree model (JsonNode hierarchy)tools.jackson.databind.annotation- Databind-specific annotationstools.jackson.databind.json- JSON-specific mapper (JsonMapper)tools.jackson.databind.jsontype- Polymorphic type handlingtools.jackson.databind.jsonFormatVisitors- Schema generation visitorstools.jackson.databind.exc- Exception typestools.jackson.databind.util- Utility classestools.jackson.databind.module- Module systemtools.jackson.databind.ext- External type integrations
Important Design Patterns
- Builder Pattern: ObjectMapper uses immutable builder pattern (3.x change)
- Factory Pattern: SerializerFactory and DeserializerFactory create handlers
- Caching: Serializers/deserializers are cached for performance
- Context Objects: SerializationContext and DeserializationContext carry state
- Visitor Pattern: JsonFormatVisitorWrapper for schema generation
Testing
Test Structure
Tests are organized by functional area under src/test/java/tools/jackson/databind/:
deser/- Deserialization testsser/- Serialization testsnode/- Tree model teststype/- Type system testsintrospect/- Introspection testsjsontype/- Polymorphic type handling testsconvert/- Conversion testsformat/- Format-specific testsmixins/- Mixin annotation testsmodule/- Module system testsobjectid/- Object identity testsrecords/- Java Records support testsviews/- JSON Views testsstruct/- Structural type testsseq/- Sequence (streaming read/write) testsmisc/- Miscellaneous testscfg/,contextual/,access/,exc/,ext/,interop/,json/,jsonschema/,util/- Other functional areastofix/- Known failing tests (deferred fixes)testutil/- Test utilities and base classes (@JacksonTestFailureExpectedlives intestutil/failure/)
Test Utilities
Use DatabindTestUtil class (in testutil/ package) which extends JacksonTestUtilBase:
- Provides common assertion methods
- Sample JSON documents and constants
- Helper methods for ObjectMapper creation
- JUnit 5 based (migrated from JUnit 4)
@JacksonTestFailureExpected
Tests for known bugs that have not yet been fixed should be placed in the tofix/ package and annotated with @JacksonTestFailureExpected (in addition to @Test). This annotation inverts the test outcome via JacksonTestFailureExpectedInterceptor:
- If the test throws an exception (the expected behavior for an unfixed bug), the test passes.
- If the test passes without error (meaning the bug was fixed), the test fails with a
JacksonTestShouldFailException— signaling that the annotation (and possibly thetofix/placement) should be removed.
This ensures known-failing tests don't break the build, while automatically detecting when a fix makes them pass so they can be promoted to regular tests.
JDK-Specific Tests
src/test-jdk21/java/- Tests that require JDK 21+ features- These are only compiled/run when building with JDK 21+
Testing, misc
- Prefer text blocks (""" separator) over other mechanisms (like "a2q" or backslash escaping)
- Avoid "test" prefix in methods (legacy code has these)
Version and Compatibility Notes
- JDK Baseline: Jackson 3.x requires JDK 17 minimum
- Android SDK: Jackson 3.0 requires Android SDK 34+
- Package Namespace:
- Jackson 1.x:
org.codehaus.jackson.map - Jackson 2.x:
com.fasterxml.jackson.databind - Jackson 3.x:
tools.jackson.databind(current)
- Jackson 1.x:
- Dependencies:
tools.jackson.core:jackson-core(streaming API)com.fasterxml.jackson.core:jackson-annotations(still 2.x groupId andcom.fasterxml.jackson.annotationpackage)
Branch Strategy
Active 3.x lines (three roles):
3.x- Development branch (a.k.a. mainline / integration branch): ongoing work toward the next minor (3.4.0-SNAPSHOT). Exactly one.3.3- Latest release branch: the latest released minor (3.3.x), the line users are steered toward. Exactly one per major.3.2,3.1- Maintenance branches: older released minors still getting fixes. Zero or more.
3.0 is closed: it gets no PRs and no merges.
The asymmetry: one development branch, one latest-release branch, and zero-or-more maintenance branches behind it. As releases progress a branch ages down — when 3.4 ships, 3.3 becomes a maintenance branch and 3.4 becomes the latest release branch.
Fixes are merged forward: they land on the oldest affected line that the backport policy below allows and are merged up one step at a time toward 3.x (e.g. Merge branch '3.1' into 3.2, then Merge branch '3.2' into 3.3, then Merge branch '3.3' into 3.x).
Long-Term Support (LTS) is an orthogonal designation, not reflected in branch names: a released line marked LTS keeps getting fixes well past the point a normal maintenance branch would be retired. Current LTS lines: 3.1, 2.21, 2.18. A branch's LTS status is independent of its role above — 3.1 kept its LTS status after aging down from latest release branch to maintenance branch.
Legacy 2.x lines:
2.x- Development branch, next minor 2.x version (2.24.0-SNAPSHOT)2.23- Latest release branch of 2.x2.22,2.21,2.18- Maintenance branches (2.21and2.18are LTS)
Backport Policy
Which changes each line accepts as a direct target:
2.18- Security fixes ONLY2.21- Security or critical fixes only3.1- Security and critical fixes, plus some safe correctness corrections2.x- Select safe correctness corrections (in addition to fixes merged forward from older lines). These must also go in3.1, since2.xmerges forward into it3.x- Everything else: this is the default target, and such changes go against3.xonly
3.2, 3.3, 2.22 and 2.23 are not direct targets: they only get fixes merged through them.
Maven Configuration
- Parent POM:
tools.jackson:jackson-base, version-locked to the project version, which tracks the branch (3.1.9-SNAPSHOTon3.1,3.4.0-SNAPSHOTon3.x, ...) - Generated file:
PackageVersion.java, intotools.jackson.databind.cfg(via maven-replacer-plugin) - Special profiles:
java21- Enables JDK 21+ test sources (src/test-jdk21/java/); auto-activated by<jdk>[21,)</jdk>errorprone- Enables ErrorProne static analysisrelease- Skips tests for release builds
Required JVM Arguments
Tests require these JVM arguments (defined in pom.xml):
--add-opens=java.base/java.lang=tools.jackson.databind
--add-opens=java.base/java.util=tools.jackson.databindCode Style and Patterns
When modifying serializers/deserializers:
- Serializers should extend
ValueSerializer<T>and overrideserialize() - Deserializers should extend
ValueDeserializer<T>and overridedeserialize() - Check if contextual configuration is needed (override
createContextual(), defined directly onValueSerializer/ValueDeserializerin 3.x -- the 2.xContextualSerializer/ContextualDeserializerinterfaces are gone;ContextualKeyDeserializerremains for key deserializers) - Consider caching implications - deserializers are heavily cached
- Handle null values appropriately
When adding features:
- Add feature flag to appropriate enum (
MapperFeature,SerializationFeature,DeserializationFeature) - Update configuration classes to handle the feature
- Add comprehensive tests in appropriate test package
- Consider backward compatibility with 2.x if relevant
When fixing bugs:
- Find or create test that reproduces the issue (in
tofix/package if deferred) - Fix should typically be in factory, serializer, or deserializer layer
- Ensure fix doesn't break existing tests
Important Implementation Details
- Thread Safety: ObjectMapper is fully thread-safe and immutable in 3.x
- Caching: Root-level deserializers are always cached with full generic type info
- Type Handling: Use
TypeFactoryfor creatingJavaTypeinstances with generics - Builder Pattern: Always use builder for ObjectMapper construction in 3.x
- Annotations: Jackson annotations (2.x) are still in the
com.fasterxml.jackson.annotationpackage (published under thecom.fasterxml.jackson.coregroupId)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

