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

@@ -547,6 +547,7 @@ class Formatter():
- "u": calls str.upper
- "c": calls str.capitalize
- "C": calls string.capwords
- "j". calls json.dumps
- "t": calls str.strip
- "d": calls text.parse_timestamp
- "U": calls urllib.parse.unquote
@@ -581,6 +582,7 @@ class Formatter():
"u": str.upper,
"c": str.capitalize,
"C": string.capwords,
"j": json.dumps,
"t": str.strip,
"T": to_timestamp,
"d": text.parse_timestamp,