<?php
/**
 * This file is part of the BEAR.Resource package
 *
 * @license http://opensource.org/licenses/bsd-license.php BSD
 */
namespace BEAR\Resource;

class JsonRenderer implements RenderInterface
{
    /**
     * {@inheritdoc}
     */
    public function render(ResourceObject $ro)
    {
        $ro->view = @json_encode($ro);
        $e = json_last_error();
        if ($e) {
            // @codeCoverageIgnoreStart
            error_log('json_encode error: ' . json_last_error_msg() . ' in ' . __METHOD__);

            return '';
            // @codeCoverageIgnoreEnd
        }

        return $ro->view;
    }
}

<?php
/**
 * This file is part of the BEAR.Resource package
 *
 * @license http://opensource.org/licenses/bsd-license.php BSD
 */
namespace BEAR\Resource;

class JsonRenderer implements RenderInterface
{
    /**
     * {@inheritdoc}
     */
    public function render(ResourceObject $ro)
    {
        $ro->view = json_encode($ro, JSON_PRETTY_PRINT);
        $e = json_last_error();
        if ($e) {
            // @codeCoverageIgnoreStart
            error_log('json_encode error: ' . json_last_error_msg() . ' in ' . __METHOD__);

            return '';
            // @codeCoverageIgnoreEnd
        }

        return $ro->view;
    }
}

--- 
+++ 
@@ -13,7 +13,7 @@
      */
     public function render(ResourceObject $ro)
     {
-        $ro->view = json_encode($ro, JSON_PRETTY_PRINT);
+        $ro->view = @json_encode($ro);
         $e = json_last_error();
         if ($e) {
             // @codeCoverageIgnoreStart
Revert "JSON_PRETTY_PRINT and remove @ operator"

This reverts commit 7b4072aca7e4e5e365277910d2baac8a581ec5bf.
