RaythaHQ / raytha

Raytha is a powerful CMS with an easy-to-use interface and fast performance. It offers custom content types, a template engine, and various access controls. It supports multiple storage providers and an automatically generated REST API. Upgrade your development workflow with Raytha.
MIT License
144 stars 30 forks source link

Liquid filter to generate JSON output #89

Closed apexdodge closed 1 year ago

apexdodge commented 1 year ago

I believe there are beneficial scenarios to include a built-in liquid filter in Raytha Templates to convert the object to JSON output:

image

Particularly useful in a situation where you are using a javascript library and the javascript is expecting data that comes from the application in json format.

Examples:

Would be added here along with the other two built-in filters we offer: https://github.com/RaythaHQ/raytha/blob/239f9bd8f0bd3c9f7c45c284bff89997656dc127/src/Raytha.Web/Services/RenderEngine.cs#L43

apexdodge commented 1 year ago

Released with v1.0.3