document ??? operator of template engine

This commit is contained in:
Michael Hoennig 2024-11-05 10:42:23 +01:00
parent 5255a3f365
commit 8e6a47c948

View File

@ -76,9 +76,16 @@ Use `${...}` for placeholders which need to be replaced with JSON quotes
`%{...}` for placeholders which need to be rendered raw
and `&{...}` for placeholders which need to get URI-encoded.
If `???` is added before the closing brace, the property is optional.
This means, if it's not available in the properties, `null` is used.
Properties with null-values are removed from the JSON.
If you need to keep a null-value, e.g. to delete a property,
use `NULL` (all caps).
use `NULL` (all caps) in the template (not the variable value).
A special syntax is the infix `???`-operator like in: `${%{var1???}???%{var2???}%{var3???}}`.
In this case the first non-null value is used.
### The Use-Case Verification