13 Apr
2026
13 Apr
'26
4:59 p.m.
Hi there, I read about the default / alternation syntax for string expansion, like %{%{Foo}:-bar}. But what I needed is this: if (foo != '' ) ? '[ %{foo} ]' : 'null'. This is for a JSON request string in a REST module configuration. The request property in question must be a JSON array ( [ .. ] ) or 'null'. I could use Unlang IF and declare the complete JSON request in different versions depending on foo. But I would prefer to do this with expansion inside the JSON string definition, if possible. Cheers Till