public function jsonSerialize()
    {
        if (!$this->count()) {
            return [];
        }

        $records = [];

        foreach ($this as $record) {
            if ($record instanceof JsonSerializable) {
                $records[] = $record->jsonSerialize();
            } else {
                $records[] = $record;
            }
        }

        return $records;
    }