diff options
author | Bob Ippolito <bob@redivi.com> | 2011-09-03 19:16:07 -0700 |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2011-09-03 19:16:07 -0700 |
commit | 50631cf809830d4c398cee58159643913cd89411 (patch) | |
tree | 859ddcd4731555c2acbf697a111cac7de5ff924e /index.rst | |
parent | 308b7421566889b10766cdab144874e29b38ff99 (diff) | |
download | simplejson-50631cf809830d4c398cee58159643913cd89411.tar.gz |
update docs with namedtuple encoding to JSON object
Diffstat (limited to 'index.rst')
-rw-r--r-- | index.rst | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -399,7 +399,7 @@ Encoders and decoders +-------------------+---------------+ | Python | JSON | +===================+===============+ - | dict | object | + | dict, namedtuple | object | +-------------------+---------------+ | list, tuple | array | +-------------------+---------------+ @@ -414,6 +414,9 @@ Encoders and decoders | None | null | +-------------------+---------------+ + .. versionchanged:: 2.2.0 + Changed *namedtuple* encoding from JSON array to object. + To extend this to recognize other objects, subclass and implement a :meth:`default` method with another method that returns a serializable object for ``o`` if possible, otherwise it should call the superclass implementation |