Skip to content
CAI
Software that uses CAICheck a score

FasterXML/jackson-module-scala

60.6

Adequate · 6 November 2026

7.1k

lines of production code

Scala

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Scala 2.13-specific deserialization modules

New modules have been added to support deserializing Scala 2.13 collection types, including Seq, SortedMap, and UnsortedMap variants (such as immutable/mutable List, Vector, ArrayBuffer, TreeMap, and TrieMap). The changes also introduce support for LazyList and provide type aliases in the \deser\ package to handle Scala 2.13 collection reorganizations (e.g., mapping removed types like MutableList to Iterable).

src/main/scala-2.13/tools/jackson/module/scala/deser · high confidence

Added Jackson Scala module service provider and license file

The application now includes the Jackson Scala module (DefaultScalaModule) via a service provider configuration file, enabling automatic discovery and registration of Scala-specific data binding features. Additionally, the Apache License 2.0 text for this module has been added to the resources.

src/main/resources · high confidence

Added serialization support for Scala 3 enums

This change introduces the EnumSerializerModule, which enables Jackson to correctly serialize Scala 3 enum types. It handles both simple enum constants (serialized as strings) and parameterized cases (serialized as objects with type tags), ensuring that enum values are properly converted to JSON during serialization.

src/main/scala-3/tools/jackson/module/scala/ser · high confidence

Java DSL for Scala Module configuration

Java users can now configure the Scala module using a dedicated Java DSL. New classes in the \tools.jackson.module.scala.javadsl\ package provide \DefaultScalaModule\ for quick setup and a \ScalaModule.Builder\ pattern that allows selective inclusion of specific Scala features (such as Option, Iterator, or Enumeration support) via individual module methods.

src/main/java · high confidence

New deserializers for Scala Duration, Either, Enumeration, BitSet, and Map types

The Scala module now includes dedicated deserialization support for several Scala standard library types that were previously only serializable or required workarounds. Users can now deserialize \scala.concurrent.duration.FiniteDuration\ (via \DurationDeserializerModule\), \Either\ (via \EitherDeserializerModule\), legacy \scala.Enumeration\ values (via \EnumerationDeserializerModule\), and \BitSet\ variants (\ImmutableBitSetDeserializer\, \MutableBitSetDeserializer\). Additionally, deserialization is now supported for \IntMap\, \LongMap\ (both immutable and mutable), and generic Scala collection factories (via \GenericFactoryDeserializerResolver\ and \GenericMapFactoryDeserializerResolver\), allowing these types to be round-tripped from JSON without manual conversion.

src/main/scala/tools/jackson/module/scala/deser · high confidence

New modules for BitSet, Duration, and Scala 3 sealed hierarchies

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 without explicit annotations (SealedPolymorphismSupport). Additionally, the ScalaModule.Builder now maintains independent annotation introspection and polymorphism state per instance, allowing multiple mappers to be configured separately 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 supports serialization of Scala 3 enums (including parameterized cases) and sealed hierarchies via a new \SealedSubtypes\ derivation mechanism. To prevent state leakage between different module configurations, enum metadata is now held per \ScalaModule\ instance rather than globally, allowing users to configure cache sizes and factories independently. \DefaultScalaModule\ has been updated to include these new capabilities alongside existing modules like \DurationModule\.

src/main/scala-3/tools/jackson/module/scala · high confidence

Scala 3 enum support and erased type preservation

The module now supports Scala 3 enums, including those with parameterized cases, by introducing new deserializers that handle both simple name-based lookup and object-tagged deserialization for complex cases. Additionally, a new \ScalaTypeInfo\ derivation mechanism captures type arguments erased by the JVM (such as primitives in generic containers) at compile time, allowing the module to correctly deserialize values into their precise declared types rather than relying on runtime heuristics.

repository · high confidence

Sealed hierarchy support for Scala 2 via scala-reflect

Added a new SubtypeLookup utility for Scala 2 that uses scala-reflect to automatically discover and enumerate implementations of sealed hierarchies. This enables the SealedPolymorphismSupport feature for Scala 2 users, allowing them to serialize and deserialize sealed traits without manually specifying subtypes, provided the scala-reflect dependency is available on the classpath.

src/main/scala-2.+/tools/jackson/module/scala/util · high confidence

Support for Jackson Scala module's \`derives\` keyword type information

The introspection layer now reads type information captured by Scala 3's \derives ScalaTypeInfo\ clause. A new \DerivedTypeInfo\ component scans class companions and sealed/enum hierarchies for the compiler-generated \derived$ScalaTypeInfo\ method, caching the results to avoid expensive reflection lookups. This enables Jackson to correctly handle field types and \@JsonCreator\ parameters for classes that rely on derivation rather than explicit annotations or parent classes.

src/main/scala-3/tools/jackson/module/scala/introspect · 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 runtime support for Scala 3 enums and sealed hierarchies

The Scala 3 module now includes dedicated utilities to handle Scala 3 enums and sealed traits at runtime. For enums, the system reflects on companion objects to build a table of cases (including parameterized ones) and uses the \@type\ property name for polymorphic tagging, with caching per module instance to handle classloader boundaries. For sealed hierarchies, it supports both exact subtype tables derived via the \SealedSubtypes\ marker trait and a fallback name-resolution strategy that reconstructs possible class names from the hierarchy root, ensuring correct deserialization of sealed types in Scala 3.

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

Refactored Scala utility classes and sealed polymorphism naming logic

The \tools.jackson.module.scala.util\ package has been restructured with new utility files (\Classes.scala\, \EnumResolver.scala\, \Options.scala\, \Strings.scala\, \PimpedType.scala\) and a significant update to \SealedPolymorphism.scala\. The sealed polymorphism support now uses a dot-separated naming convention for nested implementations (e.g., \Outer.Inner\) instead of the JVM's \$\ separator, ensuring compatibility with how \jackson-databind\ handles type names. This change affects how sealed hierarchies inside objects are named and resolved, allowing for more robust handling of nested Scala objects and companions during serialization and deserialization.

src/main/scala/tools/jackson/module/scala/util · 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 coverage 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 Jackson dependencies

The project has switched its build tool from Maven to SBT, replacing the legacy pom.xml with a new build.sbt configuration. This change updates the module to depend on Jackson 3.3.0-SNAPSHOT (under the 'tools.jackson.core' group ID) and supports Scala versions 2.12.21, 2.13.18, and 3.3.8. The build now targets Java 17, 21, 25, and 26 via Zulu distributions and includes binary compatibility checks against version 3.0.0.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 61 → 61 (-0.5)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 60 → 60 (+0.0)
  • Architecture 90 → 88 (-1.7)
  • Maturity 78 → 78 (+0.2)
  • Readiness 49 → 49 (+0.0)
  • Security 89 → 84 (-5.5)

Resolved (3)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no project overview (README.md)
  • Off-boarding risk: anonymized user #1

New (1)

  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 1 commits — 0 feature/other, 1 fixes

By area

  • src/test — 1 commit

Notable commits

  • fix: fix InteropTest deserializer reading past its own value (#915)

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.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 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 09b612e5530783071d1c230dba93c346794f3554 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.