json change from Indent to none
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -216,7 +216,7 @@ func (c *Controller) Abort(code string) { | ... | @@ -216,7 +216,7 @@ func (c *Controller) Abort(code string) { |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | func (c *Controller) ServeJson(encoding ...bool) { | 218 | func (c *Controller) ServeJson(encoding ...bool) { |
| 219 | content, err := json.MarshalIndent(c.Data["json"], "", " ") | 219 | content, err := json.Marshal(c.Data["json"]) |
| 220 | if err != nil { | 220 | if err != nil { |
| 221 | http.Error(c.Ctx.ResponseWriter, err.Error(), http.StatusInternalServerError) | 221 | http.Error(c.Ctx.ResponseWriter, err.Error(), http.StatusInternalServerError) |
| 222 | return | 222 | return |
| ... | @@ -229,7 +229,7 @@ func (c *Controller) ServeJson(encoding ...bool) { | ... | @@ -229,7 +229,7 @@ func (c *Controller) ServeJson(encoding ...bool) { |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | func (c *Controller) ServeJsonp() { | 231 | func (c *Controller) ServeJsonp() { |
| 232 | content, err := json.MarshalIndent(c.Data["jsonp"], "", " ") | 232 | content, err := json.Marshal(c.Data["jsonp"]) |
| 233 | if err != nil { | 233 | if err != nil { |
| 234 | http.Error(c.Ctx.ResponseWriter, err.Error(), http.StatusInternalServerError) | 234 | http.Error(c.Ctx.ResponseWriter, err.Error(), http.StatusInternalServerError) |
| 235 | return | 235 | return | ... | ... |
-
Please register or sign in to post a comment