Provide format.json ViewHelper
i suggest to add type json to the escape viewhelper.
Sometime you want to render json output with fluid and not with an own json view. The problem is that fluid also uses json like syntax, so if you want to add an object to a json string you run into a problem.
Imagine adding a link with the link viewhelper. It returns a sting with double quotes which need to be escaped for json.
I simply added type json to the escape viewhelper which returns the $value json_encode()'ed.
Tell me what you think.
Updated by Bastian Waidelich over 9 years ago
- Subject changed from Add type json to escape viewhelper to Provide format.json ViewHelper
Note: The escape ViewHelper will be deprecated in the next version (see #27628) so this functionality should be put in it's own format.json ViewHelper. I changed the subject of the issue accordingly