I'm trying to define a json object in the template with the JsValue of play (v2.2.2). The problem is, "
is converted to "
@(org: db.Tables.OrganizationRow)
@import models.format.EntityFormat._
@import play.api.libs.json.Json
<script type="text/javascript">
var org = @Json.toJson(org);
</script>
results in:
{"id":16,"userid":" ... more data ... };
How I'm able to get the correct json in the scala html template?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…