removed str() around objects to be serialized. As None should stay intact rather than become 'None' (#1932)

This commit is contained in:
Anton Hvornum 2023-07-17 10:13:22 +02:00 committed by GitHub
parent 10fca1611d
commit e41900a25c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,8 @@ def jsonify(obj: Any, safe: bool = True) -> Any:
return str(obj)
if hasattr(obj, "__dict__"):
return vars(obj)
return str(obj)
return obj
class JSON(json.JSONEncoder, json.JSONDecoder):
"""