Can the default render of the parser be changed? For example, take a look at the following:
Template.parse("{{context}}").render(Map.of("context", List.of("1", "2", "3")))
// prints "123"
Template.parse("{{context}}").render(Map.of("context", List.of(Map.of("key1", "value1"), Map.of("key2", "value2"))))
// prints "{key1=value1}{key2=value2}
Template.parse("{{context}}").render(Map.of("context",Map.of("key1", "value1", "key2", "value2")))
// prints "{key1=value1, key2=value2}
I want to control what the toString here is by default. I know I can create my filter toJson and then have {{context | toJson}}, but I want this to be the default behaviour.
Hello @ktalebian
This library is an implementation of Liquid templating engine in Java.
If the requested feature does not exist in the original ruby library, small chance it will be implemented here.
Can the default render of the parser be changed? For example, take a look at the following:
I want to control what the
toString
here is by default. I know I can create my filtertoJson
and then have{{context | toJson}}
, but I want this to be the default behaviour.