diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-04-15 04:37:00 (GMT) |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-04-15 04:37:00 (GMT) |
| commit | 60adf9595592a84c1108ab984d81397c0a5c613d (patch) | |
| tree | 483aef79157f4cf6554647032abdca887b72c569 | |
| parent | 046a764bb20adc7207b73165f38896bc9a922854 (diff) | |
| download | cpython-60adf9595592a84c1108ab984d81397c0a5c613d.zip cpython-60adf9595592a84c1108ab984d81397c0a5c613d.tar.gz cpython-60adf9595592a84c1108ab984d81397c0a5c613d.tar.bz2 | |
#4783: document that is not possible to use json.dump twice on the same stream.
| -rw-r--r-- | Doc/library/json.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/json.rst b/Doc/library/json.rst index 2bf242f..0b42012 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -156,6 +156,11 @@ Basic Usage Serialize *obj* to a JSON formatted :class:`str`. The arguments have the same meaning as in :func:`dump`. + .. note:: + + Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol so + trying to serialize more objects with repeated calls to :func:`dump` and + the same *fp* will result in an invalid JSON file. .. function:: load(fp, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw) |
