added pretty option to json twig filter
avoiding multiple function definitions