diff -r e065aec0e6fa Lib/json/encoder.py --- a/Lib/json/encoder.py Thu Sep 01 11:21:56 2016 -0700 +++ b/Lib/json/encoder.py Thu Sep 01 15:00:33 2016 -0500 @@ -28,7 +28,7 @@ #ESCAPE_DCT.setdefault(chr(i), '\\u%04x' % (i,)) INFINITY = float('inf') -FLOAT_REPR = repr +FLOAT_REPR = str def encode_basestring(s): """Return a JSON representation of a Python string diff -r e065aec0e6fa Modules/_json.c --- a/Modules/_json.c Thu Sep 01 11:21:56 2016 -0700 +++ b/Modules/_json.c Thu Sep 01 15:00:33 2016 -0500 @@ -1961,7 +1961,7 @@ } } /* Use a better float format here? */ - return PyObject_Repr(obj); + return PyObject_Str(obj); } static PyObject *