From a3363b0605b64cae72a90b671d0e4b3e1e02e32f Mon Sep 17 00:00:00 2001 From: astaxie Date: Thu, 15 Aug 2013 22:26:07 +0800 Subject: [PATCH] json change from Indent to none --- controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller.go b/controller.go index 50cc0f55..7dffec2d 100644 --- a/controller.go +++ b/controller.go @@ -216,7 +216,7 @@ func (c *Controller) Abort(code string) { } func (c *Controller) ServeJson(encoding ...bool) { - content, err := json.MarshalIndent(c.Data["json"], "", " ") + content, err := json.Marshal(c.Data["json"]) if err != nil { http.Error(c.Ctx.ResponseWriter, err.Error(), http.StatusInternalServerError) return @@ -229,7 +229,7 @@ func (c *Controller) ServeJson(encoding ...bool) { } func (c *Controller) ServeJsonp() { - content, err := json.MarshalIndent(c.Data["jsonp"], "", " ") + content, err := json.Marshal(c.Data["jsonp"]) if err != nil { http.Error(c.Ctx.ResponseWriter, err.Error(), http.StatusInternalServerError) return