For example, to_primitive(fallback=repr) can be used to prevent serialialization error like "ValueError: Circular reference detected" when using the JSONFormatter of oslo.log. If fallback is set, it is also used to convert itertools.count(), "nasty" objects like types, and to handle TypeError. Use fallback=six.text_type to convert objects to text. This patch doesn't change the default behaviour. Related-Bug: #1593641 Change-Id: Ie0f7f2d09355c3d2a9f7c5ee8f7e02dfea3b073b
Team and repository tags
oslo.serialization
The oslo.serialization library provides support for representing objects in transmittable and storable formats, such as Base64, JSON and MessagePack.
- Free software: Apache license
- Documentation: https://docs.openstack.org/oslo.serialization/latest/
- Source: https://git.openstack.org/cgit/openstack/oslo.serialization
- Bugs: https://docs.openstack.org/oslo.serialization/latest/
Description
Languages
Python
100%