You want to create an alternate way to serve your data from your controllers on a Symfony2 project.
How about adding one event listener to convert to JSON anything that is sent from a controller. To do this, your project has to have your controllers to return arrays of Doctrine2 Entities and also to leverage @Template
and @Route
.
If you already do, only insert this EventListener and ensure you have a dependency or two met (below). Note that except the Serializer, the other ones are not required, you would need to manually create the services in your project (not covered here).