add 'j' format string conversion

to convert to a JSON formatted string
This commit is contained in:
Mike Fährmann
2021-08-28 01:19:36 +02:00
parent 6651da27e9
commit 292fffc83c
3 changed files with 9 additions and 0 deletions

View File

@@ -62,6 +62,12 @@ Conversion specifiers allow to *convert* the value to a different form or type.
<td><code>{foo!C}</code></td>
<td><code>Foo Bar</code></td>
</tr>
<tr>
<td align="center"><code>j</code></td>
<td>Serialize value to a JSON formatted string</td>
<td><code>{tags!j}</code></td>
<td><code>["sun", "tree", "water"]</code></td>
</tr>
<tr>
<td align="center"><code>t</code></td>
<td>Trim a string, i.e. remove leading and trailing whitespace characters</td>