@drotter without this line it is not possible to call json_encode in twig template. it has no effect of JMSSerializerBundle or FOSRestBundle.