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

Cannot access functions of JSON objects in freemarker #17

Open
salander85 opened this issue Oct 4, 2021 · 1 comment
Open

Cannot access functions of JSON objects in freemarker #17

salander85 opened this issue Oct 4, 2021 · 1 comment

Comments

@salander85
Copy link

salander85 commented Oct 4, 2021

I have freemarker template with getter-functions like ${jsonObject.getCreatedAt()} but it seems like not visible in Freemarker.
This is the error i get:
Error: the string ">>> ABORTED! <<<\n\nThe cause of aborting was: \nFreeMarker template error: The following has evaluated to null or missing:\n==> jsonObj.getCreatedAt [in template \"__testMail.ftl\" at line 8, column 7]\n\n----\nTip: It's the step after the last dot that caused this error, not those before it.\n----\nTip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??\n----\n\n----\nFTL stack trace (\"~\" means nesting-related):\n\t
Is there a way to access those functions?

@ham3dz
Copy link

ham3dz commented Sep 1, 2022

+1

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

2 participants