View Source Liquex.Represent (liquex v0.13.1)

Helper methods for maps

Summary

Functions

Expands a previously represented object.

Convert any object and deeply maps atom keys to strings

Functions

@spec expand(term()) :: term()

Expands a previously represented object.

Useful when the represented object contains lazy fields. This can be useful for generating JSON values from a represented object. For example, if you had a dump filter that dumped a value to the page as JSON, you would use this function so that lazy functions get represented correctly instead of as functions.

Link to this function

represent(value, lazy \\ false)

View Source
@spec represent(any(), boolean()) :: any()

Convert any object and deeply maps atom keys to strings

The value deep determines if it should eagerly represent the object. If set to false, it will return a function for any nested objects.

Lazy values are automatically evaluated in the Liquid rendering engine.