Always i get a blank, i have a action in my controller like this
/**
* @Route("/check/{key}.json", defaults={"_format"="json"})
* @Template()
*/
public function processAction($upload_key)
{
/* make thing */
return array('data' => $process_data);
}
in my process.json.twig file i have
{% set res = { 'data': data } %}
{{ res | json_enconde | raw }}
other form
{{ { 'data': data } | json_enconde | raw }}
i've try this too:
{{ 'hello' | json_encode | raw }}
in chrome i get this response:
Connection:close
Content-Length:0
Content-Type:application/json
Date:Mon, 19 Dec 2011 05:13:17 GMT
Server:Apache/2.2.20 (Ubuntu)
X-Powered-By:PHP/5.3.6-13ubuntu3.3
and get nothing from the server, i cant solve this