public function json(array $array = [], int $code = null)
  {
    $this->data = $array;

    if ($code != null) {
      $this->code = $code;
      header('HTTP/1.1 '.$this->code);
      return $this->send();
    }

    return $this;
  }