|
|
@@ -128,6 +128,11 @@ class JsonView extends View {
|
|
|
} else {
|
|
|
$data = isset($this->viewVars[$serialize]) ? $this->viewVars[$serialize] : null;
|
|
|
}
|
|
|
+
|
|
|
+ if (version_compare(PHP_VERSION, '5.4.0', '>=') && Configure::read('debug')) {
|
|
|
+ return json_encode($data, JSON_PRETTY_PRINT);
|
|
|
+ }
|
|
|
+
|
|
|
return json_encode($data);
|
|
|
}
|
|
|
|