title: json writer for nested classes
body: <p>I'm using Play! Scala 2.2 and I have a problem to render a <code>class</code> in <code>Json</code> :</p>
  <p>I have two classes with one depending of the other, as following :</p>
  <pre><code>case class Artist(id: String, cover: String, website: List[String], link: String, Tracks: List[Track] = List())
  
  case class Track(stream_url: String, title: String, artwork_url: Option[String] )
  </code></pre>
  <p>And their implicit Writers :</p>
  <pre><code>implicit val artistWrites: Writes[Artist] = Json.writes[Artist]
  
  implicit val trackWrites: Writes[Track] = Json.writes[Track]
  </code></pre>
  <p>The writers work well as following :</p>
  <pre><code>println(Json.toJson(Track(&quot;aaa&quot;, &quot;aaa&quot;, Some(&quot;aaa&quot;))))
  println(Json.toJson(Artist(&quot;aaa&quot;, &quot;aaa&quot;, List(&quot;aaa&quot;), &quot;aaa&quot;, List())))
  </code></pre>
  <p>i.e if the <code>Artist</code> have an <strong>empty</strong> <code>list of tracks</code>.
  But if I want to do this :</p>
  <pre><code>println(Json.toJson(Artist(&quot;aaa&quot;, &quot;aaa&quot;, List(&quot;aaa&quot;), &quot;aaa&quot;, List(SoundCloudTrack(&quot;ljkjk&quot;, &quot;ljklkj&quot;, Some(&quot;lkjljk&quot;))))))
  </code></pre>
  <p>I get an <code>execution exception</code> : <code>[NullPointerException: null]</code></p>
  <p>Can you please explain me what I am doing wrong?</p>