protected function isJson($string)
    {
        $output = json_decode($string, true);
        if ($output === null) {
            return false;
        }

        return true;
    }
protected function isJson($string)
    {
        $output = json_decode($string, true);
        if ($output === null) {
            return false;
        }

        return true;
    }
protected function isJson ( $ string ) { $ output = json_decode ( $ string , true ) ; if ( $ output === null ) { return false ; } return true ; }
Checks to see if a string is valid json or not.

@param $string

@return bool
Checks to see if a string is valid json or not .