Jari Tenhunen <jari.tenhu...@iki.fi> added the comment:

>> FWIW, (simple)json module serializes subclasses of builtin types
>> just as expected.
> Does that round trip properly?  For instance, if you serialize an
> instance of a list subclass does it unserialize as a list instance
> or as the subclass?

You get a list instance. So, at least without any additional work it does not 
round trip symmetrically. But IMO this is actually the expected result; 
subclasses of string should serialize like strings, subclasses of list like 
lists etc. And when you unserialize those without any additional magic, you get 
the builtin types, not the subclasses.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue469972>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to