Adds IndentedJSON

This commit is contained in:
Manu Mtz-Almeida 2015-05-06 22:31:01 +02:00
parent f212ae7728
commit 495e6e116e
1 changed files with 4 additions and 0 deletions

View File

@ -327,6 +327,10 @@ func (c *Context) JSON(code int, obj interface{}) {
c.Render(code, render.JSON, obj) c.Render(code, render.JSON, obj)
} }
func (c *Context) IndentedJSON(code int, obj interface{}) {
c.Render(code, render.IndentedJSON, obj)
}
// Serializes the given struct as XML into the response body in a fast and efficient way. // Serializes the given struct as XML into the response body in a fast and efficient way.
// It also sets the Content-Type as "application/xml". // It also sets the Content-Type as "application/xml".
func (c *Context) XML(code int, obj interface{}) { func (c *Context) XML(code int, obj interface{}) {