From 495e6e116e3aee67401be727c182dac1ee4039a1 Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Wed, 6 May 2015 22:31:01 +0200 Subject: [PATCH] Adds IndentedJSON --- context.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/context.go b/context.go index c9674f7..6fe9484 100644 --- a/context.go +++ b/context.go @@ -327,6 +327,10 @@ func (c *Context) JSON(code int, obj interface{}) { 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. // It also sets the Content-Type as "application/xml". func (c *Context) XML(code int, obj interface{}) {