title: How to convert JSON to a type in Scala
body: <p>My problem is I receive an JSON text from say, twitter. Then I want to convert this text to an native object in scala. Is there a standard method to do this? I'm also using Play 2</p>
  
  <p>Here is what I have</p>
  
  <pre><code>import scala.io.Source.{fromInputStream}
  import java.net._
  
  val url = new URL("https://api.twitter.com/1/trends/1.json")
  val content = fromInputStream( url.openStream ).getLines.mkString("\n")
  val json = Json.parse(content)
  val a = (json \ "trends" )
  Ok(a(0))
  </code></pre>
  
  <p>I want to get all the trends name from the JSON</p>