Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These templating functions are provided by the magnolia-jsonfn module which is hosted in the Magnolia Forge GIT repository. The https://github.com/magnolia-community/jsonfn repository. The jsonfn templating functions originated in the neat-jsonfn module, hosted on GitHub and developed by rah003.

...

Define the JCR node(s) to transform into JSON.requiredSee Node defining methods.
Define the JCR properties to be added to the JSON object.requiredSee Property defining methods.
Customize JSON, resolve referenced nodes and renditions, format.optional
Generate the JSON string with the #print method.requiredSee jsonfn#print print.

Rendering JSON

In your FreeMarker template render the JSON string directly in the output stream (or assign it to a JavaScript variable).

...