diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2015-10-11 08:59:40 +0200 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2015-10-11 08:59:40 +0200 |
| commit | 45f5f02b3da261e07d4db0f0ab3f534539dce649 (patch) | |
| tree | 4e4ef9f6214c523d7a21ca2cc3ed2a0e34a8f2bf /static/classes | |
| parent | f66a642a515a4136819e9de9d2fd45ad828ff9ba (diff) | |
Pretty print JSON responses
To understand and document the API, responses should be correct,
accurate and human readable. Server-side compression (gzip) will
compensate for the extra whitespace.
OK ewhal@
Diffstat (limited to 'static/classes')
| -rwxr-xr-x | static/classes/Response.class.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index 3afcfdb..53fadef 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -164,7 +164,7 @@ class Response 'success' => false, 'errorcode' => $code, 'description' => $description, - )); + ), JSON_PRETTY_PRINT); } private static function json_success($files) @@ -172,6 +172,6 @@ class Response return json_encode(array( 'success' => true, 'files' => $files, - )); + ), JSON_PRETTY_PRINT); } } |
