[634] Handle the JSON encoding ourself, which is dangerous but at least we can return a generator from the controller and reduce mem use dramatically