oslo.serialization/oslo_serialization
ChangBo Guo(gcb) 3727b2d6e0 Explicitly raise ValueError in to_primitive
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
2017-05-17 15:55:14 +08:00
..
serializer Unified and simplified API for all serializers 2016-04-04 15:27:16 +03:00
tests Explicitly raise ValueError in to_primitive 2017-05-17 15:55:14 +08:00
__init__.py Move files out of the namespace package 2015-01-05 15:40:06 -05:00
base64.py Prefer raising the python2.x type error for b64 decode errors 2017-01-09 16:37:28 -08:00
jsonutils.py Explicitly raise ValueError in to_primitive 2017-05-17 15:55:14 +08:00
msgpackutils.py Replace six.iteritems() with .items() 2016-12-12 11:11:28 +08:00