julienrf/play-json-variants — pull request #1 by jeantil (2013-12-16 15:15:55+00:00)
Title: Add support for case objects value hierarchies

For many use cases, java enumerations can be replaced by scala algebraic data types based on a sealed trait and various case objects representing the values such as the following example :
```scala
sealed trait Status
case object ToDo extends Status
case object Done extends Status
```
If we consider the following case class and its instance:
```scala
case class Task(name:String,status:Status)
val myTask = Task("myTask", ToDo)
```
A logical Json serialisation could be:
```json
{
"name":"taskName",
"status":"ToDo"
}
```

This pull request adds support for such a serialization to the variants Json serialization generator.

( @mandubian pointed me to this project ;) )