Added JSON_PRETTY_PRINT option to json_encode