Fenos\Notifynder\Notifications\ExtraParams::isJson PHP Method

isJson() public method

Check if the value is a json string.
public isJson ( $value ) : boolean
$value
return boolean
    public function isJson($value)
    {
        if (!is_string($value)) {
            return false;
        }
        json_decode($value);
        return json_last_error() == JSON_ERROR_NONE;
    }