17 11 / 2013

ScalaJack 1.2.0

ScalaJack now supports paramterized types for case classes and traits. So now, not only is ScalaJack a fast parser, it is one of the most powerful too. Of course this works with the MongoDB rendering too.

ScalaJack isn’t a compiler, so there will certainly be combinations of parameterized types that will confuse it, but there are dozens of tested combinations. See the test suite for an exhaustive list.

To our knowledge, this is currently the only Scala JSON parser that supports parameterized types, allowing you to design more sophisticated and elegant models.

ScalaJack is a simple, very fast JSON parser/renderer for Scala case classes.

It supports unaided introspection of Scala case classes (i.e. no annotations or helper code required). ScalaJack is very fast as it’s built on top of Jackson, but uses just enough Scala reflection to support JSON serialization without helpers.

Some differentiating features:

  • Arbitrary combinations of List, Map, and Option are possible (n-levels deep) for complex structures
  • Supports value classes
  • MongoDB DBObject render/read support including compound keys
  • Support for traits (e.g. a data value of type trait Animal will resolve implementing classes Dog and Cat)
  • Render/read custom (dynamic!) JSON for value classes
  • Supports type parameters for case classes and traits
  • Very fast!

Online at: