summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt5
-rw-r--r--conf.py2
-rw-r--r--index.rst10
-rw-r--r--setup.py2
-rw-r--r--simplejson/__init__.py2
-rw-r--r--simplejson/tests/test_decode.py4
6 files changed, 18 insertions, 7 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 10cb5b9..598e216 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,8 @@
+Version 2.6.1 released 2012-07-27
+
+* raw_decode() now skips whitespace before the object
+ https://github.com/simplejson/simplejson/pull/38
+
Version 2.6.0 released 2012-06-26
* Error messages changed to match proposal for Python 3.3.1
diff --git a/conf.py b/conf.py
index abb3e70..8401dbf 100644
--- a/conf.py
+++ b/conf.py
@@ -44,7 +44,7 @@ copyright = '2012, Bob Ippolito'
# The short X.Y version.
version = '2.6'
# The full version, including alpha/beta/rc tags.
-release = '2.6.0'
+release = '2.6.1'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
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.
diff --git a/setup.py b/setup.py
index 2629044..b257890 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@ from distutils.errors import CCompilerError, DistutilsExecError, \
DistutilsPlatformError
IS_PYPY = hasattr(sys, 'pypy_translation_info')
-VERSION = '2.6.0'
+VERSION = '2.6.1'
DESCRIPTION = "Simple, fast, extensible JSON encoder/decoder for Python"
LONG_DESCRIPTION = open('README.rst', 'r').read()
diff --git a/simplejson/__init__.py b/simplejson/__init__.py
index 04a8aa6..dcf072d 100644
--- a/simplejson/__init__.py
+++ b/simplejson/__init__.py
@@ -97,7 +97,7 @@ Using simplejson.tool from the shell to validate and pretty-print::
$ echo '{ 1.2:3.4}' | python -m simplejson.tool
Expecting property name: line 1 column 2 (char 2)
"""
-__version__ = '2.6.0'
+__version__ = '2.6.1'
__all__ = [
'dump', 'dumps', 'load', 'loads',
'JSONDecoder', 'JSONDecodeError', 'JSONEncoder',
diff --git a/simplejson/tests/test_decode.py b/simplejson/tests/test_decode.py
index a140a13..37b231b 100644
--- a/simplejson/tests/test_decode.py
+++ b/simplejson/tests/test_decode.py
@@ -81,3 +81,7 @@ class TestDecode(TestCase):
self.assertEqual(
({'a': {}}, 9),
cls(object_pairs_hook=dict).raw_decode("{\"a\": {}}"))
+ # https://github.com/simplejson/simplejson/pull/38
+ self.assertEqual(
+ ({'a': {}}, 11),
+ cls().raw_decode(" \n{\"a\": {}}"))