edit this page - page history - about editing

FTL

Also known as Freemarker Templates.

freemarker.core.NonStringException: Error on line 12, column 31 in my.ftl: Expecting a string, date or number here, Expression p.enabled is instead a freemarker.template.TemplateBooleanModel$2

Here the problem is that you are trying to write a boolean (true, false) without first casting it to a string. For example:

"var": "${var}"

You instead need to write:

"var": "${var?string("true", "false")}"

Categories: Java | Template Languages
edit this page - what links to here? - page history - top
Last edited by jevon jevon 55 months ago