参考官网:https://www.playframework.com/documentation/2.0.1/ScalaJson
json的操作类似scala.xml._ api的特性
val json: JsValue = Json.parse(jsonString)
val json = Json.parse(jsonString)val maybeName = (json \ "user" \ name).asOpt[String]val emails = (json \ "user" \\ "emails").map(_.as[String])
转载于:https://blog.51cto.com/xubcing/1671223