Update provider.py
json encoder in case of set
This commit is contained in:
parent
d0bf462866
commit
02d5bc4de0
1 changed files with 3 additions and 0 deletions
|
|
@ -111,6 +111,9 @@ def _default(o: t.Any) -> t.Any:
|
|||
if isinstance(o, (decimal.Decimal, uuid.UUID)):
|
||||
return str(o)
|
||||
|
||||
if isinstance(o, set):
|
||||
return list(o)
|
||||
|
||||
if dataclasses and dataclasses.is_dataclass(o):
|
||||
return dataclasses.asdict(o)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue