[Python-checkins] cpython (merge 3.3 -> default): #17438: merge with 3.3.

ezio.melotti python-checkins at python.org
Fri Mar 29 03:02:33 CET 2013


http://hg.python.org/cpython/rev/5dcd7ee0716a
changeset:   82998:5dcd7ee0716a
parent:      82995:49cf8f656e9e
parent:      82997:e76952bd4fa5
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Fri Mar 29 04:02:14 2013 +0200
summary:
  #17438: merge with 3.3.

files:
  Doc/library/json.rst |  17 ++++++++++++-----
  1 files changed, 12 insertions(+), 5 deletions(-)


diff --git a/Doc/library/json.rst b/Doc/library/json.rst
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -123,7 +123,8 @@
                    sort_keys=False, **kw)
 
    Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-supporting
-   :term:`file-like object`).
+   :term:`file-like object`) using this :ref:`conversion table
+   <py-to-json-table>`.
 
    If *skipkeys* is ``True`` (default: ``False``), then dict keys that are not
    of a basic type (:class:`str`, :class:`int`, :class:`float`, :class:`bool`,
@@ -180,8 +181,9 @@
                     indent=None, separators=None, default=None, \
                     sort_keys=False, **kw)
 
-   Serialize *obj* to a JSON formatted :class:`str`.  The arguments have the
-   same meaning as in :func:`dump`.
+   Serialize *obj* to a JSON formatted :class:`str` using this :ref:`conversion
+   table <py-to-json-table>`.  The arguments have the same meaning as in
+   :func:`dump`.
 
    .. note::
 
@@ -201,7 +203,8 @@
 .. function:: load(fp, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
 
    Deserialize *fp* (a ``.read()``-supporting :term:`file-like object`
-   containing a JSON document) to a Python object.
+   containing a JSON document) to a Python object using this :ref:`conversion
+   table <json-to-py-table>`.
 
    *object_hook* is an optional function that will be called with the result of
    any object literal decoded (a :class:`dict`).  The return value of
@@ -246,7 +249,7 @@
 .. 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` instance containing a JSON document) to a
-   Python object.
+   Python object using this :ref:`conversion table <json-to-py-table>`.
 
    The other arguments have the same meaning as in :func:`load`, except
    *encoding* which is ignored and deprecated.
@@ -261,6 +264,8 @@
 
    Performs the following translations in decoding by default:
 
+   .. _json-to-py-table:
+
    +---------------+-------------------+
    | JSON          | Python            |
    +===============+===================+
@@ -342,6 +347,8 @@
 
    Supports the following objects and types by default:
 
+   .. _py-to-json-table:
+
    +-------------------+---------------+
    | Python            | JSON          |
    +===================+===============+

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list