diff options
author | Simon Eisenmann <simon@struktur.de> | 2014-04-07 14:50:55 +0200 |
---|---|---|
committer | Simon Eisenmann <simon@struktur.de> | 2014-04-07 14:50:55 +0200 |
commit | 4a8bb4e3021de3437f72a4246768ac704ae51132 (patch) | |
tree | cad5bc217f8d2a8692166bad49202e3a1f739e29 /core.go | |
parent | s/muxPointer/mux/ (diff) | |
download | sleepy-4a8bb4e3021de3437f72a4246768ac704ae51132.tar.gz sleepy-4a8bb4e3021de3437f72a4246768ac704ae51132.tar.bz2 sleepy-4a8bb4e3021de3437f72a4246768ac704ae51132.zip |
Always create readable JSON strings. http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#pretty-print-gzip)
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 |