Hi there, and thanks for this fine piece of software! 🎉
I'm currently moving away from FreeMarker and I'm 99% sold on Pebble – except for one important factor (for me): Pebble expects the template model to be a Map<String, Object>, while FreeMarker doesn't. FreeMarker accepts any instance of a class, Map, List, String, anything really, and the template would work fine with it. But Pebble works only with a Map.
So, I wonder, how hard would it be to add an overload for evaluate() that accepts Object model? The easiest would probably be to convert the Object to a Map (via reflection) and then forward the call to the existing evaluate() method.
Hi there, and thanks for this fine piece of software! 🎉
I'm currently moving away from FreeMarker and I'm 99% sold on Pebble – except for one important factor (for me): Pebble expects the template model to be a
Map<String, Object>
, while FreeMarker doesn't. FreeMarker accepts any instance of a class, Map, List, String, anything really, and the template would work fine with it. But Pebble works only with aMap
.So, I wonder, how hard would it be to add an overload for
evaluate()
that acceptsObject model
? The easiest would probably be to convert theObject
to aMap
(via reflection) and then forward the call to the existingevaluate()
method.