Home

Awesome

scala-pickling paradise

Scala Pickling is an automatic serialization framework made for Scala. It's fast, boilerplate-free, and allows users to easily swap in/out different serialization formats (such as binary, or JSON), or even to provide your own custom serialization format.

Basic usage:

import scala.pickling._
import json._

val pckl = List(1, 2, 3, 4).pickle
val lst = pckl.unpickle[List[Int]]

Quick Start

Get Scala Pickling

Scala Pickling for Scala 2.10.2 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...

<!-- This project aims to turn [a custom build of macro paradise](https://github.com/heathermiller/scala-pickling/tree/topic/scala-pickling) that we used in [Object-Oriented Pickler Combinators and an Extensible Generation Framework](http://lampwww.epfl.ch/~hmiller/files/pickling.pdf) into a standalone library that targets [Macro Paradise 2.11](http://docs.scala-lang.org/overviews/macros/paradise.html#macro_paradise_for_211x). Known limitations: 1. ~~No support for `@pickleable`.~~ 2. In the public API (and everywhere else), vanilla type tags are replaced with `scala.pickling.FastTypeTag/scala.pickling.fastTypeTag`. 3. Picklers are generated directly at call sites, since we cannot have introduceTopLevel in 2.10.x. 4. No runtime compilation, since it's not obvious how to package it without inducing a dependency on `scala-compiler.jar`. -->