PHPackages                             bu/json-response-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. bu/json-response-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

bu/json-response-bundle
=======================

Symfony2 bundle allows to use templates for json responses

1.0.1(11y ago)088MITPHP &gt;=5.3.2

Since Jun 24Compare

[ Source](https://github.com/Fludimir/JsonResponseBundle)[ Packagist](https://packagist.org/packages/bu/json-response-bundle)[ Docs](http://github.com/Fludimir/JsonResponseBundle)[ RSS](/packages/bu-json-response-bundle/feed)WikiDiscussions Synced 2d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

BuJsonResponseBundle
====================

[](#bujsonresponsebundle)

BuJsonResponseBundle helps you to use templates for json responses in just same way as templates are used for html responses, allowing you to separate business logic and data presentation when you need to return data in json format.

Based on @Template annotation from [SensioFrameworkExtraBundle](http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html)and requires it.

[![Build Status](https://camo.githubusercontent.com/c649e43c5893e8426d6a4c8be3744f2af8f7245db9cb49b3978675fe358012c3/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f466c7564696d69722f4a736f6e526573706f6e736542756e646c652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/Fludimir/JsonResponseBundle)

Installation
------------

[](#installation)

Add bundle with composer:

`composer require bu/json-response-bundle dev-master`

[Enable php templating engine](http://symfony.com/doc/current/cookbook/templating/PHP.html)in your symfony config:

```
# app/config/config.yml
framework:
    # ...
    templating:
        engines: ['twig', 'php']
```

register bundle in AppKernel.php :

```
