title: Format nullable Seq or List of objects with Play Json and Salat
body: <p>I want to convert a json to Salat model. I am using Play 2.X Scala Json. I couldn't find any documentations to format nullable Seq. According to <a href="https://github.com/novus/salat/wiki/SupportedTypes" rel="nofollow">https://github.com/novus/salat/wiki/SupportedTypes</a>, I can't use Option[Seq] Or Option[List].</p>
  
  <p>The following json is good, but sometimes 'locations' can be missing.</p>
  
  <pre><code>{
      "id": 581407,
      "locations": [
          {
              "id": 1692,
              "tag_type": "LocationTag",
              "name": "san francisco",
              "display_name": "San Francisco"
          }]
  }
  </code></pre>
  
  <p>These are the classes:</p>
  
  <pre><code>case class User(
   var id: Int,
   var locations: Seq[Tag] = Seq.empty
  )
  
  case class Tag(
    id: Int,
    tag_type:String,
    name:String,
    display_name:String
  )
  </code></pre>
  
  <p>How can I format nullable 'locations'?</p>
  
  <pre><code>implicit val format: Format[User] = (
      (__ \ 'id).format[Int] and
      (__ \ 'locations).formatNullable(Seq[Tag])
  )
  </code></pre>