Skip to content

Releases: ramonhagenaars/jsons

v1.3.0

09 Oct 20:09
33db6d4
Compare
Choose a tag to compare
  • Feature: Added warn_on_fail parameter to default_list_deserializer that allows to continue deserialization upon errors.
  • Feature: Added transform that can transform an object to an object of another type.
  • Feature: Added serializer and deserializer for pathlib.Path (thanks to alexmirrington).
  • Change: When loading a list fails, the error message now points to the failing index.
  • Bugfix: Fixed bug when dumping an object with an innerclass.

v1.2.0

03 Jul 20:46
919d860
Compare
Choose a tag to compare
  • Bugfix: Fixed bug with postponed typehints (PEP-563).
  • Bugfix: Loading an invalid value targeting an optional did not raise.
  • Bugfix: Loading a dict did not properly pass key_transformers.
  • Bugfix: Loading a namedtuple did not properly use key_transformers.
  • Bugfix: Utilized __annotations__ in favor _field_types because of deprecation as of 3.8.

v1.1.1

22 Dec 14:09
aa565f5
Compare
Choose a tag to compare
  • 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.

v1.1.0

04 Dec 21:03
Compare
Choose a tag to compare
  • 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.

v1.0.0

07 Oct 17:51
Compare
Choose a tag to compare
  • 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.