Forum Discussion
shawn-ad
Guide
Thanks, Yuri. It is interesting that I can use your suggestion to convert any XML emdpoint into JSON. However, I was trying to get JSON data rendered inside the page HTML so that I don't have to make a separate HTTP request to the API (or to a custom endpoint).
Clearly Lithium has a way to get an API response as XML markup (using @@markup an endpoint). it would be great if I could get JSON using a similar FreeMarker translation method, and do so in a component to get it rendered in-page.
luk
10 years agoBoss
big +1000, the problem is not to get JSON from an endpoint but inside a component or any type of freemarker code...the rest() lithium context object ALWAYS returns a freemarker node when used in a freemarker template, this makes things much harder as they would need to be =/
Related Content
- 5 years ago
- 5 years ago