public function setAllowJsonApi($allowJsonApi)
    {
        if (!is_bool($allowJsonApi)) {
            throw new \InvalidArgumentException('`allowJsonApi` expects boolean value!');
        }

        $this->options['allowJsonApi'] = (bool) $allowJsonApi;
        return $this;
    }