From 26e02ef3b674493f13ce826ba53fe4ac88aec5a4 Mon Sep 17 00:00:00 2001 From: "teromene@teromene.fr" Date: Fri, 19 Feb 2016 16:15:06 +0000 Subject: [PATCH] Pretty-printing the output of JsonFormat. --- formats/JsonFormat.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/formats/JsonFormat.php b/formats/JsonFormat.php index 400f91f7..e765ef54 100644 --- a/formats/JsonFormat.php +++ b/formats/JsonFormat.php @@ -11,7 +11,7 @@ class JsonFormat extends FormatAbstract{ // FIXME : sometime content can be null, transform to empty string $datas = $this->getDatas(); - return json_encode($datas); + return json_encode($datas, JSON_PRETTY_PRINT); } public function display(){ @@ -21,4 +21,4 @@ class JsonFormat extends FormatAbstract{ return parent::display(); } -} \ No newline at end of file +}