code: public function json(array $data = [], int $statusCode = 200)
      {
          $this->setContent(json_encode($data));
          $this->setStatusCode($statusCode);
          $this->json = true;
  
          return $this;
      }
docs: Json response
  
  @param array $data
  @param int   $statusCode
  
  @return Response