score:3

Don't forget @Html.

@Html(Json.stringtify(Json.toJson(Scala object)))

score:5

You can rely on the Json.toJson() method to make the conversion

@import play.api.libs.json._

var strArray = @Json.stringify(Json.toJson(List("hello", "world", "everybody")))

Related Query

More Query from same tag