FasterXML/jackson-module-scala
67.2
Adequate · 20 September 2026
7k
lines of production code
Scala
primary language
1
measurement over time
What this system is
This system is the Jackson Scala module, a library that extends the Jackson JSON processor to handle serialization and deserialization of Scala-specific types. It provides comprehensive support for Scala 2 and Scala 3 features, including case classes, enums, sealed hierarchies, and standard collections like Map, Set, and Duration. The module ensures compatibility across multiple Scala versions by offering version-specific deserializers and introspection logic, while also exposing a Java DSL for configuration and automatic discovery via ServiceLoader.
How it got here
2010–2022 — Jackson 3 migration and Scala 3 support
19 changes.
The project migrated its build system from Maven to sbt and updated to Jackson 3.3, while adding comprehensive support for Scala 3 enums and sealed hierarchies. Extensive work was done to implement dedicated serializers and deserializers for Scala-specific types, including collections, durations, and bitsets, alongside a new Java DSL for configuration. The period also involved refactoring introspection logic and adding robust test coverage for both Scala 2.12/2.13 and Scala 3 compatibility.
2023–2026 — Scala 3 serialization support
6 changes.
This period focused on implementing native serialization support for Scala 3 enums and sealed hierarchies, including compile-time subtype derivation and per-instance state management. It also integrated Duration support into the DefaultScalaModule and established a consistent introspection framework across Scala 2 and 3 versions to handle type information and erased fields.
Features
Add Jackson Scala module service provider and license
The distribution now includes the Apache 2.0 license for the Jackson JSON processor Scala module in META-INF/LICENSE and registers the DefaultScalaModule via the standard Java ServiceLoader mechanism in META-INF/services/tools.jackson.databind.JacksonModule, enabling automatic discovery of the Scala module by Jackson applications.
src/main/resources · high confidence
Added Scala 2.13-specific deserialization modules for collections and maps
This change introduces new deserializer modules specifically for Scala 2.13, enabling proper deserialization of various collection and map types. The SeqDeserializerModule handles deserialization for Seq, Iterable, and their immutable/mutable variants (including LazyList, Vector, ArrayBuffer, etc.). The SortedMapDeserializerModule adds support for SortedMap and TreeMap types. The UnsortedMapDeserializerModule covers Map, HashMap, ListMap, and other map implementations, including special handling for LongMap and IntMap. Additionally, type aliases in the package object address Scala 2.13 changes (e.g., MutableList/ResizableArray removals), and LazyListSupport provides utilities for LazyList deserialization.
src/main/scala-2.13/tools/jackson/module/scala/deser · high confidence
New Java DSL for Scala Module configuration
Java users can now configure the Scala module using a dedicated Java DSL located in the \tools.jackson.module.scala.javadsl\ package. This includes a \ScalaModule.Builder\ for incremental configuration, a \DefaultScalaModule\ singleton for quick setup, and static factory methods to retrieve specific sub-modules (such as Option, Iterator, or Enumeration support) without needing to write Scala code.
src/main/java · high confidence
New deserializers for Scala-specific types and collections
The deserialization module now includes dedicated support for several Scala standard library types that were previously unsupported or handled generically. Users can now deserialize \scala.concurrent.duration.FiniteDuration\, \scala.collection.immutable.BitSet\, \scala.collection.mutable.BitSet\, \scala.collection.immutable.IntMap\, \scala.collection.immutable.LongMap\, \scala.collection.mutable.LongMap\, \scala.Enumeration\#Value\, \scala.collection.immutable.SortedSet\, \scala.collection.mutable.SortedSet\, \scala.math.BigDecimal\, \scala.math.BigInt\, and Scala companion objects (case objects). These new deserializers are registered via specific modules (e.g., \DurationDeserializerModule\, \ImmutableBitSetDeserializer\, \IntMapDeserializerResolver\) and handle null values and duplicate properties according to the configured \ScalaModule.Config\ settings.
src/main/scala/tools/jackson/module/scala/deser · high confidence
New modules for BitSet, Duration, and Sealed Polymorphism support
The Scala module now includes dedicated modules for deserializing Scala BitSet types (BitSetDeserializerModule), serializing and deserializing FiniteDuration values (DurationModule), and automatic polymorphic handling of sealed hierarchies (SealedPolymorphismModule). Additionally, the ScalaModule.Builder now maintains independent annotation introspection and polymorphism state per instance, allowing multiple module configurations to coexist without sharing caches or settings.
src/main/scala/tools/jackson/module/scala · high confidence
Scala 3 enum and sealed hierarchy support with per-instance state
The Scala 3 module now includes native support for serializing and deserializing Scala 3 enums and sealed hierarchies. Users can leverage a new \SealedSubtypes\ derivation mechanism as an alternative to the marker trait for sealed classes, enabling compile-time enumeration of subtypes. The \EnumModule\ handles Scala 3 enum cases, including parameterized ones, and is automatically included in the \DefaultScalaModule\. To prevent state leakage between different module configurations, enum and sealed hierarchy state is now held per module instance rather than globally, allowing each \ScalaModule\ builder to maintain its own cache and settings.
src/main/scala-3/tools/jackson/module/scala · high confidence
Support for Jackson Scala \`derives\` clause type information
The introspection module now captures type information for classes using Scala 3's \derives\ clause. A new \DerivedTypeInfo\ component reads the \derived$ScalaTypeInfo\ marker left by the compiler on class companions (or sealed/enum bases) to determine field and \@JsonCreator\ parameter types. This enables Jackson to correctly serialize and deserialize case classes and enums that rely on \derives\ for their type descriptions, including handling mix-ins and caching results per module instance to avoid repeated class loading overhead.
src/main/scala-3/tools/jackson/module/scala/introspect · high confidence
Support for Scala 3 enums and sealed hierarchies
The module now supports serialization and deserialization of Scala 3 enums, including those with parameterized cases, by using a \@type\ property to tag the specific case. It also adds support for sealed hierarchies marked with \SealedPolymorphismSupport\, allowing the module to automatically discover and dispatch on implementations. This is achieved through new modules (\EnumDeserializerModule\, \EnumSerializerModule\, \SealedPolymorphismDeserializerModule\) and utility classes (\Scala3EnumInfo\, \SubtypeLookup\) that handle the reflective discovery of enum cases and sealed subtypes.
repository · high confidence
Behavioural changes
DefaultScalaModule now includes Duration support
The DefaultScalaModule has been updated to automatically include the DurationModule, ensuring that Scala Duration types are serialized and deserialized out-of-the-box without requiring manual module configuration. This change consolidates the module's capabilities, making it more comprehensive for users relying on the default setup.
src/main/scala-2.+/tools/jackson/module/scala · high confidence
Improved Scala 2.13 runtime compatibility with Duration and Tasty detection
The Scala 2.13 module now includes built-in converters for seamless interoperability between Scala's FiniteDuration and Java's Duration, leveraging standard library features. Additionally, the TastyUtil component has been updated to correctly detect Scala 2.13 .tasty files by checking resources through the specific class loader that loaded the class, ensuring accurate identification of Scala classes in complex environments like containers or OSGi.
src/main/scala-2.13/tools/jackson/module/scala/util · high confidence
Improved sealed hierarchy subtype lookup for Scala 3
The Scala 3 module now uses a new \SubtypeLookup\ utility to resolve implementations of sealed hierarchies. It prioritizes an exact list of subtypes captured at compile time via the \SealedSubtypes\ derivation, falling back to reconstructing class names from the hierarchy root when that derivation is absent. This approach avoids eager static initialization during class loading and ensures that sealed types are correctly identified and instantiated during polymorphic serialization and deserialization.
src/main/scala-3/tools/jackson/module/scala/util · high confidence
Migration to tools.jackson package namespace
The Scala module's type modifier components have been moved to the new tools.jackson.base package structure. This change updates the internal package declarations and imports to align with the tools.jackson groupId, ensuring the Scala-specific type handling for Option, Either, Map, IntMap, LongMap, and Iterable types functions correctly within the reorganized library layout.
src/main/scala/tools/jackson/module/scala/modifiers · high confidence
New serialization modules for Scala types and sealed hierarchies
The \src/main/scala/tools/jackson/module/scala/ser\ directory now includes dedicated serializer modules for \FiniteDuration\, \Enumeration\, \Symbol\, and \Tuple\ types, ensuring they are serialized consistently with Jackson's expectations. Additionally, \SealedPolymorphismSerializerModule\ and \TypeTaggedSerializer\ have been added to support round-trippable serialization of Scala 2 and Scala 3 sealed hierarchies and enums without requiring explicit \@JsonTypeInfo\ annotations. The \MapSerializerModule\ has been updated to derive polymorphic type IDs from the Scala \Map\ itself rather than its \java.util.Map\ wrapper, fixing issues where polymorphic typing would fail to read back Scala maps correctly.
src/main/scala/tools/jackson/module/scala/ser · high confidence
Placeholder implementation for erased type information in Scala 2
The Scala 2 introspection module now includes a \DerivedTypeInfo\ class that serves as a no-op placeholder for capturing erased type arguments. In Scala 3, this capability is handled natively, but for Scala 2 users, type information for erased fields and \@JsonCreator\ parameters must still be registered manually via \registerReferencedValueType\. This change ensures the introspector builds consistently across Scala versions by providing an empty implementation that returns no derived type shapes, deferring the actual type resolution to user-provided registrations.
src/main/scala-2.+/tools/jackson/module/scala/introspect · high confidence
Refactored Scala introspection and creator handling
The introspection logic in the Scala module has been restructured to improve how Jackson handles Scala-specific features. BeanIntrospector now uses Java reflection to identify constructor parameters and default values, while CompanionCreator and its instantiator enable deserialization via @JsonCreator methods on companion objects, even when static forwarders are missing. JavaAnnotationIntrospector and JavaParameterIntrospector now explicitly handle parameter name resolution for Java classes, ensuring Scala bean rules are not incorrectly applied to them. Additionally, OrderingLocator provides a centralized way to locate Orderings for various types, including Option and Comparable wrappers.
src/main/scala/tools/jackson/module/scala/introspect · high confidence
Scala 2.12 compatibility layer for collections and utilities
This change introduces a dedicated Scala 2.12 source directory containing compatibility shims and deserialization modules. It adds specific deserializers for Scala collections (Seq, SortedMap, UnsortedMap) to ensure correct instantiation of immutable and mutable types during JSON parsing. It also provides type aliases and implicit conversions (e.g., for LazyList, IterableOnce, and knownSize) to bridge gaps between Scala 2.12 and 2.13 APIs, includes a Duration converter to replace missing standard library functionality, and disables Tasty file checks that are irrelevant for Scala 2.11/2.12.
src/main/scala-2.12 · high confidence
Test coverage
Added Java test fixtures and probes for Scala module serialization; Added Scala 2-specific test coverage for introspection, polymorphism, and serialization; Added Scala 3 test coverage for enum and sealed hierarchy serialization; Added comprehensive test suite for Jackson Scala module; Added serialization tests for Scala 2.13 collection types; Added test for serializing a custom Scala Map; Added test for serializing unpackaged case classes; Added tests for ArraySeq and TreeSeqMap deserialization.
Dependencies
Migrate build system from Maven to sbt and update to Jackson 3.3
The project has replaced its Maven build configuration (pom.xml) with an sbt build file (build.sbt), shifting the build tooling and dependency management to the Scala ecosystem. This change updates the module to target Jackson 3.3.0-SNAPSHOT (under the \tools.jackson.core\ group) and expands supported Scala versions to include 2.12.21, 2.13.18, and 3.3.8, while also updating test dependencies like ScalaTest to version 3.2.20.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 67.
Lenses
- Code Health 95
- Architecture 100
- Maturity 84
- Readiness 46
- Security 84
Changes since last survey
- 300 commits — 288 feature/other, 12 fixes
By area
- (root) — 100 commits
- src/main — 75 commits
- src/test — 46 commits
- release-notes/VERSION.md — 30 commits
- release-notes/VERSION3.md — 21 commits
- project/build.properties — 11 commits
- .github/workflows — 9 commits
- project/plugins.sbt — 6 commits
- (repo) — 2 commits
Notable commits
- fix: Fix 3.0 test wrt change in jackson-databind
- fix: Fix minor compilation issue wrt databind/5485
- fix: Merge pull request #729 from FasterXML/tatu/3.0/fix-test-wrt-introspection
- fix: Revert "Remove module file" (#738)
- fix: Revert "re-enable sbt plugins (#740)" (#741)
- fix: Update VERSION.md with new fixes and version info
- fix: Update VERSION3.md with 3.0.2 fixes
- fix: fix issue with FAIL_ON_NULL_CREATOR_PROPERTIES for collections (#734)
- fix: fix issue with JsonProperty name override for constructor vars (#782)
- fix: fix test case where scala user wants alphabetic sorting of properties (#773)
- fix: try to fix compile issues (#801)
- fix: try to fix jar publish
- change: 3.0 branch
- change: 3.0.0-rc2-SNAPSHOT
- change: 3.0.0-rc3-SNAPSHOT
- change: 3.0.0-rc4-SNAPSHOT
- change: 3.0.0-rc6-SNAPSHOT
- change: 3.3.0-SNAPSHOT
- change: Add Java DSL so that Java users can more easily add the Scala Module (#710)
- change: Add release notes for jackson-module-scala 3.3.0
- …and 280 more
Architecture
- 0 containers · 1 bounded contexts · 0 dependency edges (baseline)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
FasterXML/jackson-module-scala was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 34556124244d997bd8e8787e7eb8013538fdd709 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.