symfony/symfony — pull request #3375 by igorw (2012-02-16 09:44:01+00:00)
Title: [json-response] Add a JsonResponse class for convenient JSON encoding

Usage example:

$data = array(user => $user->toArray());
return new JsonResponse($data);