public function outputJSON()
    {
        if (count($this->data) > 1 && $this->outputMode == self::MODE_SINGLE) {
            throw new \Exception('multiple records returned, but output-mode is single?');
        }
        return $this->formatJSON();
    }