zut.collection.parse_dict
- zut.collection.parse_dict(value: str) dict[str, str]
Parse a comma-separated string of key=value pairs into a dict, with support for quoted values.
Format rules: - Pairs are separated by commas - Keys and values are separated by = - Values can be quoted with “ or ‘ to include commas and whitespace - Inside quoted values, the quote character can be escaped with a backslash (" or ') - Unquoted values are stripped of surrounding whitespace - If = is omitted, the value defaults to an empty string
Exceptions: - If the value starts and ends with { and }, func:decode_json is used.