jsons v1.1.0 Release Notes
Release Date: 2019-12-04 // over 4 years ago-
๐ Changes
- ๐ Feature: Added
strict
parameter todump
to indicate that dumping a certaincls
will ignore any extra data. - Feature: When using
dump(obj, cls=x)
,x
can now be any class (previously, only a class with__slots__
). - ๐ Feature: Support for dumping
Decimal
(thanks to herdigiorgi). - ๐ Feature: Primitives are now cast if possible when dumping (e.g.
dump(5, str)
). - ๐ Feature: Dumping iterables with generic types (e.g.
dump(obj, List[str])
) will now dump with respect to that types (ifstrict
) - ๐ Feature: The
default_dict
serializer now optionally accepts types:Optional[Dict[str, type]]
. - ๐ Change: Improved performance when dumping using
strict=True
(up to 4 times faster!). - ๐ Bugfix:
set_validator
with multiple types did not work.
- ๐ Feature: Added