Scala - convert String to Json using Play json
问题 I need help to parse a json string into scala class using playJson I wrote a formatter but I don't know how to handle the nested arrays. Where Document Case class is case class Document(content: String, score: Double, size: Int, path:String) and formatter implicit val similarHashFormatter: Format[SimilarHash] = ( ((__ \ "hits" \ "hits" \\ "fields")(0) \ "content_hash")(0).format[String] and (__ \ "hits" \ "hits" \\ "_score").format[Double] and ((__ \ "hits" \ "hits" \\ "fields")(0) \ "ast