symfony/symfony — pull request #4873 by Nyholm (2012-07-12 11:14:20+00:00)
Title: [Controller] [FrameworkBundle] Added function to quicker create jsonResponses

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:

This function does only make it quicker to create json responses. Refer to http://symfony2forum.org/threads/5-Using-Symfony2-jQuery-and-Ajax

The function could be replaced with:
```php
new Response(json_encode($return),200,array('Content-Type'=>'application/json'));
```
But there is a lot to write for a common response.