I was hoping to use Scala and Gson together. It seems to mostly work, but when I do something like this, it treats the list as an object, not an array:
import scala.collection.JavaConverters._
case class MyType (val x:String, val y:List[SomeOtherType]) {
def toJson() = new Gson().toJson(this.asJava())
}