[issue35111] Make Custom Object Classes JSON Serializable

Raymond Hettinger report at bugs.python.org
Wed Oct 31 01:32:01 EDT 2018


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

> If you can serialize an object using pickle,
> why not have the ability to serialize objects using json?

One reason would be that the JSON spec was intentionally designed to handle a limited number of types so that it would have maximum interoperability between languages. Another reason is that in order to make other types round-trip between encoding and decoding, you would need to control both ends, in which case, you might as well use pickle.

----------
nosy: +rhettinger
versions:  -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35111>
_______________________________________


More information about the Python-bugs-list mailing list