View on GitHub

Scala Pickling

Fast, Customizable, Boilerplate-Free Serialization for Scala

Pickling (or serializing) an object is as easy as:

import scala.pickling._
import json._

val pckl = List(1, 2, 3, 4).pickle

Unpickling is just as easy:

val lst = pckl.unpickle[List[Int]]

Publication

Details of the pickling framework can be found in our draft paper (under review):

Instant Pickles: Generating Object-Oriented Pickler Combinators for Fast and Extensible Serialization, by Heather Miller, Philipp Haller, Eugene Burmako, and Martin Odersky. In OOPSLA'13, Indianapolis, IN, USA, October 26-31 2013.

Talks

ScalaDays 2013
On Pickles and Spores: Improving Support for Distributed Programming in Scala,
by Heather Miller, June 13th 2013

Strange Loop 2013
Spores: Distributable Functions in Scala,
by Heather Miller, September 18th 2013
(this talk covers mostly spores, closures that you can serialize and distribute in Scala)


See More!

Benchmarks

Download

Scala Pickling for Scala 2.10.3 is available on Sonatype! You can find Scala Pickling under groupID: org.scala-lang and artifactID: scala-pickling_2.10. The current version is 0.8.0-SNAPSHOT.

You can use Scala Pickling in your SBT project by simply adding the following dependency to your build file:

libraryDependencies += "org.scala-lang" %% "scala-pickling" % "0.8.0-SNAPSHOT"

For a more illustrative example, see a sample SBT project which uses Scala Pickling.

Or you can just directly download the jar.

What Makes It Different?

Scala Pickling…