Jsons

Latest version: v1.6.3

Safety actively analyzes 629599 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

1.1.1

- Feature: Added a serializer for ``Union`` types.
- Change: Exceptions are more clear upon deserialization failure (thanks to haluzpav).
- Change: You can no longer announce a class with a custom name.
- Bugfix: Fixed dumping optional attributes.
- Bugfix: Dataclasses inheriting from ``JsonSerializable`` always dumped their attributes as if in strict mode.

1.1.0

- Feature: Added ``strict`` parameter to ``dump`` to indicate that dumping a certain ``cls`` 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 (if ``strict``)
- 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.

1.0.0

- Feature: Added a serializer/deserializer for ``time``.
- Feature: Added a serializer/deserializer for ``timezone``.
- Feature: Added a serializer/deserializer for ``timedelta``.
- Feature: Added a serializer/deserializer for ``date``.
- Bugfix: Dumping verbose did not store the types of dicts (``Dict[K, V]``).
- Bugfix: Loading with ``List`` (no generic type) failed.
- Bugfix: Loading with ``Dict`` (no generic type) failed.
- Bugfix: Loading with ``Tuple`` (no generic type) failed.

Page 3 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.