From fa680bded718653a64ba747887c71a956e044223 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Thu, 17 Nov 2016 22:31:19 -0800 Subject: [PATCH] Defaults to pretty JSON in dev mode. --- command/agent/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/http.go b/command/agent/http.go index 082fc039b5..b9b8902b50 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -393,7 +393,7 @@ func (s *HTTPServer) wrap(handler func(resp http.ResponseWriter, req *http.Reque // marshalJSON marshals the object into JSON, respecting the user's pretty-ness // configuration. func (s *HTTPServer) marshalJSON(req *http.Request, obj interface{}) ([]byte, error) { - if _, ok := req.URL.Query()["pretty"]; ok { + if _, ok := req.URL.Query()["pretty"]; ok || s.agent.config.DevMode { buf, err := json.MarshalIndent(obj, "", " ") if err != nil { return nil, err