From 6f5ca6ba4d2f71958176756eac2ac7fe6ec62537 Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Fri, 27 Jul 2012 21:59:46 -0700 Subject: bump version to 2.6.1 and add test/docs for #38 raw_decode fix --- index.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'index.rst') 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. -- cgit v1.2.1