Forum Discussion
nathan
Executive
There may be a simpler solution, but you could use a macro to convert the Freemarker object to JSON, for example:
http://ericbrandel.com/2013/03/28/freemarker-container-to-json/
shawn-ad
12 years agoGuide
Thank you. I'll have to try it to be sure, but I don't see where this macro inserts quotes around strings in the resulting JSON, and I don't see any escaping happening, so I don't think the JSON would be safe to use in JavaScript code if the data was tainted and unescaped.
Lithium Engineering: Please add a native options for escaped JSON string output from the internal rest() function.
Related Content
- 5 years ago
- 5 years ago