title: Play Scala JSON body parser default value field
body: <p>Hello I'm having trouble with a JSON body parser.
  My problem is the following I have a case class with some optional parameters (Option[T]) and a parameter with a default value which I do not want to be typed as Option[T].</p>
  
  <p>However when parsing a JSON body having the field with the default value omitted I get an error</p>
  
  <pre><code>play.api.libs.JsError
  /count error path missing
  </code></pre>
  
  <p>Here is my controller code :</p>
  
  <pre><code>object MyController extends Controller{
  
  
    implicit val itemWrites = Json.writes[Item]
    implicit val itemReads = Json.reads[Item]
    implicit val itemFormats = Json.format[Item]
  
    def add = DBAction(parse.json){ implicit rs =&gt;
  
      val item =  rs.request.body.validate[Item]
  }
  </code></pre>
  
  <p>Here is my case class :</p>
  
  <pre><code>case class Item( id:Option[Int], name:String, description:Option[String], count:Int=0)
  </code></pre>
  
  <p>Any chance I can achieve the same behavior as Option[T] with the default value field?</p>
  
  <p>Thanks</p>
  
  <p>I'm using :</p>
  
  <ul>
  <li>Scala 2.10</li>
  <li>Play Framework 2.2.1</li>
  <li>Play-Slick plugin 0.5.0.8</li>
  </ul>