summaryrefslogtreecommitdiff
path: root/index.rst
diff options
context:
space:
mode:
Diffstat (limited to 'index.rst')
-rw-r--r--index.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/index.rst b/index.rst
index cb9a0ab..4a8b5c7 100644
--- a/index.rst
+++ b/index.rst
@@ -418,14 +418,16 @@ Encoders and decoders
:exc:`JSONDecodeError` will be raised if the given JSON
document is not valid.
- .. method:: raw_decode(s)
+ .. method:: raw_decode(s[, idx=0])
Decode a JSON document from *s* (a :class:`str` or :class:`unicode`
- beginning with a JSON document) and return a 2-tuple of the Python
- representation and the index in *s* where the document ended.
+ beginning with a JSON document) starting from the index *idx* and return
+ a 2-tuple of the Python representation and the index in *s* where the
+ document ended.
This can be used to decode a JSON document from a string that may have
- extraneous data at the end.
+ extraneous data at the end, or to decode a string that has a series of
+ JSON objects.
:exc:`JSONDecodeError` will be raised if the given JSON
document is not valid.