summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Kulmala <janne.t.kulmala@tut.fi>2012-07-19 12:59:49 +0300
committerJanne Kulmala <janne.t.kulmala@tut.fi>2012-07-19 12:59:49 +0300
commitf55e882aafa73732d63129cf1280c093acc916db (patch)
tree68ab31139a84f340a1badb2de08b4341f762555d
parent16b63cdb118138f8639b6f005d92f2136c815a1e (diff)
downloadsimplejson-f55e882aafa73732d63129cf1280c093acc916db.tar.gz
raw_decode(): Document 'idx' parameter
-rw-r--r--simplejson/decoder.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/simplejson/decoder.py b/simplejson/decoder.py
index 714a733..20e04b8 100644
--- a/simplejson/decoder.py
+++ b/simplejson/decoder.py
@@ -413,6 +413,8 @@ class JSONDecoder(object):
"""Decode a JSON document from ``s`` (a ``str`` or ``unicode``
beginning with a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
+ Optionally, ``idx`` can be used to specify an offset in ``s`` where
+ the JSON document begins.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.