In the Application.java I get all users
public static void index() {
renderArgs.put("users", Users.getAll()); //getAll() returns gson.JsonArray
}
In index.html I bootstrap this users like this:
<script type="text/javascript">
Users.reset(&{users});
</script>
But the JSON is rendered like this:
[{"id":"1234" ...
How can I get the JSON to be formated as JSON?
Maybe this will help:
From playframework documentation:
raw()
Returns the object without template escaping.
Returns: play.templates.Template.ExecutableTemplate.RawData.