[New-bugs-announce] [issue39196] json fails to encode dictionary view types
Joe Gordon
report at bugs.python.org
Thu Jan 2 14:10:58 EST 2020
New submission from Joe Gordon <joe.gordon0 at gmail.com>:
Python 3 fails to encode dictionary view objects. Assuming this is an expected behavior, what is the thinking behind it? I was unable to find any documentation around this.
> import json; json.dumps({}.values())
"TypeError: Object of type dict_values is not JSON serializable"
----------
components: Library (Lib)
messages: 359212
nosy: jogo
priority: normal
severity: normal
status: open
title: json fails to encode dictionary view types
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39196>
_______________________________________
More information about the New-bugs-announce
mailing list