Do you really need a utility class? I just tried this:
Not explicitly no.
{{velocity}}
#set($map = {'name':'marius'})
$map.name
{{/velocity}}
The problem is that I don't seem to be able to update a
map created that way. If I try:
{{velocity}}
#set($map = {'name':'marius'})
$map.put('myname','adam')
$map.name
{{/velocity}}
It fails. Whereas if I use a map from elsewhere (xcontext for example) and pass it in it
seems to work just fine.
I may be missing something obvious, that happens a lot!
Cheers,
Adam