Forum Discussion
Hi luk ,
Unfortunately we have not added a way to do this yet, but I have taken to heart how long it has been and have added a pull request to add in support for parsing the request body (named http.request.body, in endpoints only) and a utils object for converting to/from a JSON string to a Freemarker hash (utils.json.toJson(hash) and utils.json.fromJson(string)).
I'll update this post once I know what version of the Community product it will go into.
Thanks,
-Doug
DougS that's awesome, thank you very much! Any chance support or professional services could merge that PR into a specific instance? Could you provide the (internal) PR number so I could refer it with support/PS? Currently working on a project where that functionality is needed rather urgently... was planning to create a microservice that would receive the incoming request, extract the request body and forward it to Lithium/FreeMarker in way it can understand.
With that new information this seems kind of unnecessary though, of course that depends on the answer if support/PS can add the new FreeMarker functionality ahead of the official release for a specific client?
Also great to have "official" tools to parse JSON, always had to rely on a custom JSON-parser method in FreeMarker, which was less than ideal, using ?eval and a bunch of ?replace()'s!
Thanks again!
Related Content
- 9 years ago
- 12 years ago