public function getBaseJSONObject()
    {
        $o = new stdClass();
        $error = $this->getError();
        if ($error instanceof Exception) {
            $o->error = true;
            $o->errors = [$error->getMessage()];
        } elseif ($error instanceof ErrorList && $error->has()) {
            $o->error = true;
            $o->errors = [];
            foreach ($error->getList() as $e) {
                $o->errors[] = (string) $e;
            }
        } else {
            $error = (string) $error;
            if ($error !== '') {
                $o->error = true;
                $o->errors = [$error];
            }
        }
        $o->time = $this->getTime();
        $o->message = $this->getMessage();
        $o->title = $this->getTitle();
        $o->redirectURL = (string) $this->getRedirectURL();
        foreach ($this->additionalData as $key => $value) {
            $o->{$key} = $value;
        }

        return $o;
    }