diff options
author | Ask Solem <ask@rabbitmq.com> | 2012-06-21 16:42:29 +0100 |
---|---|---|
committer | Ask Solem <ask@rabbitmq.com> | 2012-06-21 16:42:29 +0100 |
commit | c32edef91e221265428a08dd46263421e302eb96 (patch) | |
tree | 804a96e02651c8edfe45e15ab2bcbea5823baea6 /anyjson/__init__.py | |
parent | c344fe5dcaeb1d8e1ad4ab4dca08457bc1f7b55c (diff) | |
download | anyjson-c32edef91e221265428a08dd46263421e302eb96.tar.gz |
Seems like json can't load StringIO to a unicode string
Diffstat (limited to 'anyjson/__init__.py')
-rw-r--r-- | anyjson/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/anyjson/__init__.py b/anyjson/__init__.py index f254a42..0aee329 100644 --- a/anyjson/__init__.py +++ b/anyjson/__init__.py @@ -94,7 +94,7 @@ class _JsonImplementation(object): ValueError if the string could not be parsed.""" # uses StringIO to support buffer objects. try: - if self._filedecode: + if self._filedecode and not isinstance(s, basestring): return self._filedecode(StringIO(s)) return self._decode(s) except self._decode_error, exc: |