Added
- Generify custom encoder class
python
class GenerifyCustomEncoder(GenerifyEncoder):
def default(self, obj, path):
if isinstance(obj, datetime):
return obj.isoformat()
else:
return GenerifyEncoder.default(self, obj, path)
...
ret = generify({"a": 1, "b": Scalar()}, cls=GenerifyCustomEncoder)
Fixed
- Iterable handling convertion to list.
- pandas DataFrame index with objects handling, handle as iterable
- generify raise_getattr_exception flag, raising GenerifyGetAttrException of failure:
python
generic_obj = generify(obj, raise_getattr_exception=True)