[New-bugs-announce] [issue27934] json float encoding incorrect for dbus.Double
Eddie James
report at bugs.python.org
Thu Sep 1 16:20:23 EDT 2016
New submission from Eddie James:
JSON does not correctly encode dbus.Double types, even though all other dbus types are handled fine. I end up with output like this (0.25 is the floating point value): dbus.Double(0.25, variant_level=1)
Found that the encoding uses repr() for float objects but uses str() for integer objects. I propose a change to use str() for float objects as well. This could be ported back to 2.7 as well
----------
components: Library (Lib)
files: json-float-str-default.patch
keywords: patch
messages: 274179
nosy: eajames
priority: normal
severity: normal
status: open
title: json float encoding incorrect for dbus.Double
type: behavior
versions: Python 2.7, Python 3.6
Added file: http://bugs.python.org/file44333/json-float-str-default.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27934>
_______________________________________
More information about the New-bugs-announce
mailing list