
The problem in the current version of to_primitive function from jsonutils module is in the situation when the function doesn't know how to convert an object to primitive. In that case the function simply returns the same object which causes the following exception later in json.dumps: ValueError: Circular reference detected. This exception is not obvious and is quite misleading. So I think it would be better to explicitly raise ValueError here. Closes-Bug: #1593641 Change-Id: If9e8dd5cc2634168910d5f9f8d9302aeefa16097
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: http://docs.openstack.org/developer/oslo.serialization
- Source: http://git.openstack.org/cgit/openstack/oslo.serialization
- Bugs: http://bugs.launchpad.net/oslo.serialization
Description
Languages
Python
100%