it needs to be ``constant('JSON_PRETTY_PRINT')`` to use the constant in Twig.