$this->set('_serialize', $variable) makes corrupt json data

Hello,
I ran into a problem the other day. While attempting to implement a RESTful interface, an error occured in my AngularJs script:

angular.min.js:118 SyntaxError: Unexpected end of JSON input

I have never seen anything similar before, so I checked the JSON output manually and detected a very queer behavoir:

  {
        "id": 301,
        "voucher_type_id": 80,
        "extid": null,
        "user_id": null,
        "token": "lbbhd663",
        "acknowledged": false,
        "purchased": null,
        "updated": "2016-11-18T16:46:40+00:00",
        "user": null,
        "voucher_type": {
            "handle": "Chickenburger",
            "price": 55
        }
    }

This is actually the end of the output, which started like this:

{
"vouchers": [
    {
        "id": 2,
        "voucher_type_id": 80,
        "extid": null,
        "user_id": null,
        "token": "cTemQbvE",
        "acknowledged": false,
        "purchased": null,
        "updated": "2016-11-15T17:08:30+00:00",
        "user": null,
        "voucher_type": {
            "handle": "Chickenburger",
            "price": 55
        }
    },

I expected the output to end with a square bracket and a curly bracket, but that is not what I received.
Does anyone know where the problem could be? The funny thing is, that if I limit the results by 18(Only god knows why it is 18), it works as expected. I already tried to serialize it with the default json_encode function, which works properly.