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 <rep...@bugs.python.org> <http://bugs.python.org/issue27934> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com