Add jsonify template func

This commit is contained in:
Bjørn Erik Pedersen committed 2016-03-06 15:01:14 +01:00
1 parent 3aff0830df
commit 5517f248c6
1 file changed
+8
+8
View File
@@ -112,6 +112,14 @@ e.g.
{{ .Render "summary" }}
{{ end }}
### jsonify
Encodes a given object to JSON.
e.g.
{{ dict "title" .Title "content" .Plain | jsonify }}
### last
Slices an array to only the last _N_ elements.