Type Convert
Data Types Conversion
Template Engine will try to automatically convert input data to the data type required for function/method arguments. It will follow the rules:
Numbers
| Source |
Number Representative |
Null Reference (null) |
0 |
| Undefined |
0 |
| Boolean |
1 for true, 0 for false |
| String |
Will try to parse the number in the string |
| DateTime |
Will convert to timestamp |
Boolean
| Source |
Boolean Representative |
Null Reference (null) |
false |
| Undefined |
false |
| String |
false if empty, true otherwise |
| List or Map |
false if empty, true otherwise |
| Number |
false for 0, true otherwise |
DateTime
| Source |
DateTime Representative |
| String |
Will try to parse the ISO 8601 string:: yyyy-MM-dd'T'HH:mm:ss.SSSZ If string is now, will be converted to current datetime. |
| Number |
Will convert to date using this number as timestamp |