diff options
author | Doug Black <doug@dougblack.io> | 2014-04-24 20:52:41 -0700 |
---|---|---|
committer | Doug Black <doug@dougblack.io> | 2014-04-24 20:52:41 -0700 |
commit | 929e726c5f2604cdcb95a2e82b7002a51f1858aa (patch) | |
tree | cad5bc217f8d2a8692166bad49202e3a1f739e29 /core.go | |
parent | s/muxPointer/mux/ (diff) | |
parent | Always create readable JSON strings. http://www.vinaysahni.com/best-practices... (diff) | |
download | sleepy-929e726c5f2604cdcb95a2e82b7002a51f1858aa.tar.gz sleepy-929e726c5f2604cdcb95a2e82b7002a51f1858aa.tar.bz2 sleepy-929e726c5f2604cdcb95a2e82b7002a51f1858aa.zip |
Merge pull request #20 from strukturag/pretty_print
Always create readable JSON strings.
Diffstat (limited to 'core.go')
-rw-r--r-- | core.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -91,7 +91,7 @@ func (api *API) requestHandler(resource interface{}) http.HandlerFunc { code, data, header := handler(request.Form, request.Header) - content, err := json.Marshal(data) + content, err := json.MarshalIndent(data, "", " ") if err != nil { rw.WriteHeader(http.StatusInternalServerError) return |