public function renderContent()
    {
        $string = json_encode($this->getContent(), $this->option, $this->depth);

        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new \RuntimeException('Json encode error ! (error: ' . json_last_error_msg() . ')');
        }

        return $string;
    }
public function renderContent()
    {
        $string = json_encode($this->getContent(), $this->option, $this->depth);

        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new \RuntimeException('Json encode error ! (error: ' . json_last_error_msg() . ')');
        }

        return $string;
    }
public function renderContent ( ) { $ string = json_encode ( $ this -> getContent ( ) , $ this -> option , $ this -> depth ) ; if ( json_last_error ( ) !== JSON_ERROR_NONE ) { throw new \ RuntimeException ( 'Json encode error ! (error: ' . json_last_error_msg ( ) . ')' ) ; } return $ string ; }
Encode content into json format & display it.

@return string
@throws \RuntimeException
Encode content into json format & display it .