diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2009-09-13 08:13:21 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2009-09-13 08:13:21 (GMT) |
commit | 713e042152c3e554157293180f1407aea7446ae9 (patch) | |
tree | 39d8fe21e6d60787c61dfc28c85394d0a6428e58 /Doc/library/json.rst | |
parent | f388053649111e08ac213c0073cc60f02790351a (diff) | |
download | cpython-713e042152c3e554157293180f1407aea7446ae9.zip cpython-713e042152c3e554157293180f1407aea7446ae9.tar.gz cpython-713e042152c3e554157293180f1407aea7446ae9.tar.bz2 |
Merged revisions 74764 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r74764 | ezio.melotti | 2009-09-13 10:54:02 +0300 (Sun, 13 Sep 2009) | 1 line
fixed more examples that were using u"", print without () and unicode/str instead of str/bytes
........
Diffstat (limited to 'Doc/library/json.rst')
-rw-r--r-- | Doc/library/json.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/json.rst b/Doc/library/json.rst index e220e7b..6ad95b2 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -118,7 +118,7 @@ Basic Usage file-like object). If *skipkeys* is ``True`` (default: ``False``), then dict keys that are not - of a basic type (:class:`str`, :class:`unicode`, :class:`int`, + of a basic type (:class:`bytes`, :class:`str`, :class:`int`, :class:`float`, :class:`bool`, ``None``) will be skipped instead of raising a :exc:`TypeError`. @@ -201,13 +201,13 @@ Basic Usage .. function:: loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw) - Deserialize *s* (a :class:`str` or :class:`unicode` instance containing a JSON + Deserialize *s* (a :class:`bytes` or :class:`str` instance containing a JSON document) to a Python object. - If *s* is a :class:`str` instance and is encoded with an ASCII based encoding + If *s* is a :class:`bytes` instance and is encoded with an ASCII based encoding other than UTF-8 (e.g. latin-1), then an appropriate *encoding* name must be specified. Encodings that are not ASCII based (such as UCS-2) are not - allowed and should be decoded to :class:`unicode` first. + allowed and should be decoded to :class:`str` first. The other arguments have the same meaning as in :func:`dump`. |