title: Convert nested case class to JSON using spray-json
body: <p>If I have nested case classes, how can they be converted to JSON using spray-json?</p>
  
  <p>For example my structure looks something like:</p>
  
  <pre><code>case class MyObj1(name: String, myObject2: MyObject2)
  case class MyObj2(myObjec3s: Seq[MyObj3])
  case class MyObj3(name1: String, name2: String)
  
  The json would look something like:
  {
    "name": "",
    "myObject2": [ { "name1": "", "name2": "" }, { "name1": "", "name2": "" }, .... ]
  }
  </code></pre>