Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template model #682

Open
ndawod opened this issue Aug 8, 2024 · 0 comments
Open

Template model #682

ndawod opened this issue Aug 8, 2024 · 0 comments

Comments

@ndawod
Copy link

ndawod commented Aug 8, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant