01177314a1
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
(cherry picked from commit
|
||
---|---|---|
doc/source | ||
oslo_serialization | ||
releasenotes | ||
tools | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.testr.conf | ||
CONTRIBUTING.rst | ||
HACKING.rst | ||
LICENSE | ||
README.rst | ||
babel.cfg | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
README.rst
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/