mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
add support for Paths in json encoder
This commit is contained in:
parent
abf68e5437
commit
008769d296
1 changed files with 4 additions and 1 deletions
|
@ -276,7 +276,10 @@ class ExtendedEncoder(pyjson.JSONEncoder):
|
|||
|
||||
elif isinstance(obj, Exception):
|
||||
return '{}: {}'.format(obj.__class__.__name__, obj)
|
||||
|
||||
|
||||
elif isinstance(obj, Path):
|
||||
return str(obj)
|
||||
|
||||
elif cls_name in ('dict_items', 'dict_keys', 'dict_values'):
|
||||
return tuple(obj)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue