passing list, hash to functions
dsailer <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
I'm working on custom template functions to convert objects to json so I have:
public class JsonConverter implements TemplateMethodModelEx {
public Object exec(List args) throws TemplateModelException {
.....
}
}
when I do this in a template:
<#assign test3 = {"name":"mouse", "price":50}>
${exec.toJson(test3)}
the passed argument is a:
private class SequenceHash implements TemplateHashModelEx
inside of a:
final class HashLiteral extends Expression
I guess I was expecting a SimpleHash. I must be doing something wrong here.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/