Skip to content

Commit

Permalink
Merge pull request #2518 from hashicorp/f-pretty
Browse files Browse the repository at this point in the history
Defaults to pretty JSON in dev mode.
  • Loading branch information
slackpad authored Nov 18, 2016
2 parents bb54e74 + fa680bd commit 761833c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command/agent/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 761833c

Please sign in to comment.