diff options
author | Bob Ippolito <bob@redivi.com> | 2012-07-27 21:59:46 -0700 |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2012-07-27 21:59:46 -0700 |
commit | 6f5ca6ba4d2f71958176756eac2ac7fe6ec62537 (patch) | |
tree | 52a68a2b4bdda7227c8586b8e948eaa2991e7ed7 /index.rst | |
parent | 5178cb760e35a8a921fd509f7d5da383d122d54e (diff) | |
download | simplejson-6f5ca6ba4d2f71958176756eac2ac7fe6ec62537.tar.gz |
bump version to 2.6.1 and add test/docs for #38 raw_decode fixv2.6.1
Diffstat (limited to 'index.rst')
-rw-r--r-- | index.rst | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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. |