title: Mapping Seq to JSON in Play
body: <p>I'm trying to map a Scala case class to JSON using Play 2.x. This works for simple versions of the case class, but not when there's a Seq or List of objects involved: then I get 'no implicit format' and 'no unapply function found' errors. </p>
  
  <p>The code I'm using for this is the following:</p>
  
  <pre><code>case class Book(title: String, authors: Seq[Author])
  case class Author(name: String)
  </code></pre>
  
  <p>I've used the <code>Json.format</code> macro to generate the Reads and Writes for this:</p>
  
  <pre><code>implicit val bookFormat = Json.format[Book]
  implicit val authorFormat = Json.format[Author]
  </code></pre>
  
  <p>But now when I'm compiling my code, I get the following error:</p>
  
  <pre><code>Error:(25, 40) Play 2 Compiler: 
   /Users/erikp/Userfiles/projects/play/booksearch/app/models/user.scala:25: No implicit format for Seq[models.Author] available.
     implicit val bookFormat = Json.format[Book]
                                          ^
  </code></pre>
  
  <p>Without the Seq it works nicely, but with the Seq, it fails. I tried adding <code>implicit val authorsFormat = Json.format[Seq[Author]]</code> to the implicit converters, but that has no effect.</p>