public function asJson($default = null)
    {
        return Validate::asJson($this->params[$this->key] ?? $this->params, $default);
    }
public function asJson($default = null)
    {
        return Validate::asJson($this->params[$this->key] ?? $this->params, $default);
    }
public function asJson ( $ default = null ) { return Validate :: asJson ( $ this -> params [ $ this -> key ] ?? $ this -> params , $ default ) ; }
Data sanitation and return as JSON.

@since 2.0.0

@param mixed $default → default value

@return mixed → value, null or customized return value
Data sanitation and return as JSON .