As it worked out, it was a problem on the client-side.
Previously, my code had been: var bootstrap = {{{bootstrap}}};
.
The bootstrap variable here isn't being received as a string: it's being received as an object. Putting the variable between single quotes solved the issue:
var bootstrap = '{{{bootstrap}}}';
There's still a mysterious limit on the length of the string: past 150 or so objects, the JSON parse fails-on-load. Otherwise: works great.