I might be misunderstanding this part so bear with me :).

The `PhotoController` shouldn't ever return JSON. That's the job of `ApiPhotoController`. Also anytime JSON is returned we have a [standard envelope](https://github.com/photo/documentation/blob/master/docs/api/Envelope.markdown) for this which can be called via `$this->success($message, $response)` [see all response types](https://github.com/photo/frontend/blob/master/src/libraries/controllers/ApiBaseController.php).