Add-on module for Jackson ( to support Scala-specific datatypes

Language: Scala

Build Status Maven Central


Please use at least versions 2.6.5, or 2.7.2; earlier released versions are known to contain significant bugs.


Jackson is a fast JSON processor for Java that supports three models: streaming, node, and object mapping (akin to the three independent models SAX, DOM, and JAXB in XML).

The object mapping model is a high-level processing model that allows the user to project JSON data onto a domain-specific data model appropriate for their application, without having to deal with the low-level mechanics of JSON parsing. It is the standard object mapping parser implementaton in Jersey, the reference implementation for JSR-311 (Java API for Restful Web Services).

Scala is a functional programming language for the JVM that supports Java interoperability. Its standard library is quite distinct from Java, and does not fulfill the expectations of Jacksons default mappings. Notably, Scala collections do not derive from java.util.Collection or its subclasses, and Scala properties do not (by default) look like Java Bean properties.

The Scala Module supports serialization and limited deserialization of Scala Case Classes, Sequences, Maps, Tuples, Options, and Enumerations.


Support for class constructor arguments currently depends upon Paranamer, specifically an implementation that depends upon constructor parameter names being present in the class debug information. Since this is the default in Scala, it is usually not an issue, but since it's possible to turn this off, be aware that the current version will throw an exception if it cannot find the constructor parameter names. Future versions may permit configuration to suppress this exception.


To use the Scala Module in Jackson, simply register it with the ObjectMapper instance:

val mapper = new ObjectMapper()

DefaultScalaModule is a Scala object that includes support for all currently supported Scala data types. If only partial support is desired, the component traits can be included individually:

val module = new OptionModule with TupleModule {}
val mapper = new ObjectMapper()

You can also mixin ScalaObjectMapper (experimental) to get rich wrappers that automatically convert scala manifests directly into TypeReferences for Jackson to use:

val mapper = new ObjectMapper() with ScalaObjectMapper
val myMap = mapper.readValue[Map[String,Tuple2[Int,Int]]](src)

Consult the Scaladoc for further details.


The master branch often depends on SNAPSHOT versions of the core Jackson projects, which are published to the Sonatype OSS Repository. To make these dependencies available, create a file called sonatype.sbt in the same directory as build.sbt with the following content. The project .gitignore file intentionally prevents this file from being checked in.

resolvers += "Sonatype OSS Snapshots" at ""

Download, docs

Check out Wiki. API Scaladocs can be found on the project site but they are not really well suited to end users, as most classes are implementation details of the module.


Developed with IntelliJ IDEA

Project Statistics

Sourcerank 17
Repository Size 15.3 MB
Stars 385
Forks 108
Watchers 28
Open issues 88
Dependencies 0
Contributors 42
Tags 89
Last updated
Last pushed

Top Contributors See all

Christopher Currie Nate Bauernfeind Morten Kjetland Tatu Saloranta theif daveclay PJ Fanning sullis David Pratt brharrington Christopher Currie Ismael Juma Stefan Endrullis kenji yoshida Kevin Scaldeferri Anton Panasenko Seth Tisue Arnauld Loyer Ian Forsey Rintcius Blok

Packages Referencing this Repo

Latest release 2.9.8 - Published - 385 stars
Latest release 2.9.7 - Updated - 385 stars
Latest release 2.8.4 - Published - 385 stars
Latest release 2.8.4 - Published - 385 stars
Latest release 2.8.3 - Updated - 385 stars
Add-on module for Jackson ( to support Scala (http://www.scala-la...
Latest release 1.9.3 - Updated - 385 stars
Latest release 2.9.9 - Updated - 385 stars
This package is no longer available on Maven
Latest release 2.3.5 - Updated - 385 stars
Add-on module for Jackson ( to support Scala (http://www.scala-la...
Latest release 2.1.2 - Updated - 385 stars
Latest release 2.3.5 - Updated - 385 stars
Latest release 2.3.5 - Updated - 385 stars
Latest release 2.9.8 - Updated - 385 stars

Recent Tags See all

jackson-module-scala-2.9.9-for-scala-2.13.0-rc3 May 31, 2019
jackson-module-scala-2.9.9 May 19, 2019
jackson-module-scala-2.9.8-for-scala-2.13.0-rc1 April 06, 2019
jackson-module-scala-2.9.8 December 16, 2018
jackson-module-scala-2.9.7 September 22, 2018
jackson-module-scala-2.9.6 June 14, 2018
jackson-module-scala-2.9.5 March 28, 2018
jackson-module-scala-2.8.11 January 28, 2018
jackson-module-scala-2.9.4 January 28, 2018
jackson-module-scala-2.9.2 November 12, 2017
jackson-module-scala-2.8.10 September 11, 2017
jackson-module-scala-2.9.1 September 11, 2017
jackson-module-scala-2.9.0 July 30, 2017
jackson-module-scala-2.8.9 June 12, 2017
jackson-module-scala-2.9.0.pr3 April 25, 2017

Something wrong with this page? Make a suggestion

Last synced: 2019-06-10 15:54:45 UTC

Login to resync this repository